home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: gdbm-1
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file gdbm-1.7.3/dbminit.c, mode 666 , uid 21641 , gid 13 , size 7252 , seconds 5507304022
| default
| |
98%
| file
| data
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| Kopftext: 'gdbm-1.7.3/dbminit.c'
| default (weak)
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 64 62 6d 69 6e |gdbm-1.7|.3/dbmin|
|00000010| 69 74 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |it.c....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00000070| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00000080| 20 20 20 37 32 35 32 20 | 20 35 35 30 37 33 30 34 | 7252 | 5507304|
|00000090| 30 32 32 20 20 20 37 33 | 32 35 00 20 00 00 00 00 |022 73|25. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 2f 2a 20 64 62 6d 69 6e | 69 74 2e 63 20 2d 20 4f |/* dbmin|it.c - O|
|00000210| 70 65 6e 20 74 68 65 20 | 66 69 6c 65 20 66 6f 72 |pen the |file for|
|00000220| 20 64 62 6d 20 6f 70 65 | 72 61 74 69 6f 6e 73 2e | dbm ope|rations.|
|00000230| 20 54 68 69 73 20 6c 6f | 6f 6b 73 20 6c 69 6b 65 | This lo|oks like|
|00000240| 20 74 68 65 0a 20 20 20 | 44 42 4d 20 69 6e 74 65 | the. |DBM inte|
|00000250| 72 66 61 63 65 2e 20 2a | 2f 0a 0a 2f 2a 20 20 54 |rface. *|/../* T|
|00000260| 68 69 73 20 66 69 6c 65 | 20 69 73 20 70 61 72 74 |his file| is part|
|00000270| 20 6f 66 20 47 44 42 4d | 2c 20 74 68 65 20 47 4e | of GDBM|, the GN|
|00000280| 55 20 64 61 74 61 20 62 | 61 73 65 20 6d 61 6e 61 |U data b|ase mana|
|00000290| 67 65 72 2c 20 62 79 20 | 50 68 69 6c 69 70 20 41 |ger, by |Philip A|
|000002a0| 2e 20 4e 65 6c 73 6f 6e | 2e 0a 20 20 20 20 43 6f |. Nelson|.. Co|
|000002b0| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 39 30 |pyright |(C) 1990|
|000002c0| 2c 20 31 39 39 31 2c 20 | 31 39 39 33 20 20 46 72 |, 1991, |1993 Fr|
|000002d0| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|000002e0| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 0a 20 20 |dation, |Inc... |
|000002f0| 20 20 47 44 42 4d 20 69 | 73 20 66 72 65 65 20 73 | GDBM i|s free s|
|00000300| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|00000310| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 20 69 74 | redistr|ibute it|
|00000320| 20 61 6e 64 2f 6f 72 20 | 6d 6f 64 69 66 79 0a 20 | and/or |modify. |
|00000330| 20 20 20 69 74 20 75 6e | 64 65 72 20 74 68 65 20 | it un|der the |
|00000340| 74 65 72 6d 73 20 6f 66 | 20 74 68 65 20 47 4e 55 |terms of| the GNU|
|00000350| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|00000360| 4c 69 63 65 6e 73 65 20 | 61 73 20 70 75 62 6c 69 |License |as publi|
|00000370| 73 68 65 64 20 62 79 0a | 20 20 20 20 74 68 65 20 |shed by.| the |
|00000380| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00000390| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|000003a0| 20 76 65 72 73 69 6f 6e | 20 32 2c 20 6f 72 20 28 | version| 2, or (|
|000003b0| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 0a |at your |option).|
|000003c0| 20 20 20 20 61 6e 79 20 | 6c 61 74 65 72 20 76 65 | any |later ve|
|000003d0| 72 73 69 6f 6e 2e 0a 0a | 20 20 20 20 47 44 42 4d |rsion...| GDBM|
|000003e0| 20 69 73 20 64 69 73 74 | 72 69 62 75 74 65 64 20 | is dist|ributed |
|000003f0| 69 6e 20 74 68 65 20 68 | 6f 70 65 20 74 68 61 74 |in the h|ope that|
|00000400| 20 69 74 20 77 69 6c 6c | 20 62 65 20 75 73 65 66 | it will| be usef|
|00000410| 75 6c 2c 0a 20 20 20 20 | 62 75 74 20 57 49 54 48 |ul,. |but WITH|
|00000420| 4f 55 54 20 41 4e 59 20 | 57 41 52 52 41 4e 54 59 |OUT ANY |WARRANTY|
|00000430| 3b 20 77 69 74 68 6f 75 | 74 20 65 76 65 6e 20 74 |; withou|t even t|
|00000440| 68 65 20 69 6d 70 6c 69 | 65 64 20 77 61 72 72 61 |he impli|ed warra|
|00000450| 6e 74 79 20 6f 66 0a 20 | 20 20 20 4d 45 52 43 48 |nty of. | MERCH|
|00000460| 41 4e 54 41 42 49 4c 49 | 54 59 20 6f 72 20 46 49 |ANTABILI|TY or FI|
|00000470| 54 4e 45 53 53 20 46 4f | 52 20 41 20 50 41 52 54 |TNESS FO|R A PART|
|00000480| 49 43 55 4c 41 52 20 50 | 55 52 50 4f 53 45 2e 20 |ICULAR P|URPOSE. |
|00000490| 20 53 65 65 20 74 68 65 | 0a 20 20 20 20 47 4e 55 | See the|. GNU|
|000004a0| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|000004b0| 4c 69 63 65 6e 73 65 20 | 66 6f 72 20 6d 6f 72 65 |License |for more|
|000004c0| 20 64 65 74 61 69 6c 73 | 2e 0a 0a 20 20 20 20 59 | details|... Y|
|000004d0| 6f 75 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 72 |ou shoul|d have r|
|000004e0| 65 63 65 69 76 65 64 20 | 61 20 63 6f 70 79 20 6f |eceived |a copy o|
|000004f0| 66 20 74 68 65 20 47 4e | 55 20 47 65 6e 65 72 61 |f the GN|U Genera|
|00000500| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|00000510| 0a 20 20 20 20 61 6c 6f | 6e 67 20 77 69 74 68 20 |. alo|ng with |
|00000520| 47 44 42 4d 3b 20 73 65 | 65 20 74 68 65 20 66 69 |GDBM; se|e the fi|
|00000530| 6c 65 20 43 4f 50 59 49 | 4e 47 2e 20 20 49 66 20 |le COPYI|NG. If |
|00000540| 6e 6f 74 2c 20 77 72 69 | 74 65 20 74 6f 0a 20 20 |not, wri|te to. |
|00000550| 20 20 74 68 65 20 46 72 | 65 65 20 53 6f 66 74 77 | the Fr|ee Softw|
|00000560| 61 72 65 20 46 6f 75 6e | 64 61 74 69 6f 6e 2c 20 |are Foun|dation, |
|00000570| 36 37 35 20 4d 61 73 73 | 20 41 76 65 2c 20 43 61 |675 Mass| Ave, Ca|
|00000580| 6d 62 72 69 64 67 65 2c | 20 4d 41 20 30 32 31 33 |mbridge,| MA 0213|
|00000590| 39 2c 20 55 53 41 2e 0a | 0a 20 20 20 20 59 6f 75 |9, USA..|. You|
|000005a0| 20 6d 61 79 20 63 6f 6e | 74 61 63 74 20 74 68 65 | may con|tact the|
|000005b0| 20 61 75 74 68 6f 72 20 | 62 79 3a 0a 20 20 20 20 | author |by:. |
|000005c0| 20 20 20 65 2d 6d 61 69 | 6c 3a 20 20 70 68 69 6c | e-mai|l: phil|
|000005d0| 40 63 73 2e 77 77 75 2e | 65 64 75 0a 20 20 20 20 |@cs.wwu.|edu. |
|000005e0| 20 20 75 73 2d 6d 61 69 | 6c 3a 20 20 50 68 69 6c | us-mai|l: Phil|
|000005f0| 69 70 20 41 2e 20 4e 65 | 6c 73 6f 6e 0a 20 20 20 |ip A. Ne|lson. |
|00000600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 6f 6d | | Com|
|00000610| 70 75 74 65 72 20 53 63 | 69 65 6e 63 65 20 44 65 |puter Sc|ience De|
|00000620| 70 61 72 74 6d 65 6e 74 | 0a 20 20 20 20 20 20 20 |partment|. |
|00000630| 20 20 20 20 20 20 20 20 | 20 57 65 73 74 65 72 6e | | Western|
|00000640| 20 57 61 73 68 69 6e 67 | 74 6f 6e 20 55 6e 69 76 | Washing|ton Univ|
|00000650| 65 72 73 69 74 79 0a 20 | 20 20 20 20 20 20 20 20 |ersity. | |
|00000660| 20 20 20 20 20 20 20 42 | 65 6c 6c 69 6e 67 68 61 | B|ellingha|
|00000670| 6d 2c 20 57 41 20 39 38 | 32 32 36 0a 20 20 20 20 |m, WA 98|226. |
|00000680| 20 20 20 0a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .****|********|
|00000690| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000006c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 0a |********|*****/..|
|000006d0| 0a 2f 2a 20 41 49 58 20 | 64 65 6d 61 6e 64 73 20 |./* AIX |demands |
|000006e0| 74 68 69 73 20 62 65 20 | 74 68 65 20 76 65 72 79 |this be |the very|
|000006f0| 20 66 69 72 73 74 20 74 | 68 69 6e 67 20 69 6e 20 | first t|hing in |
|00000700| 74 68 65 20 66 69 6c 65 | 2e 20 2a 2f 0a 23 69 66 |the file|. */.#if|
|00000710| 20 21 64 65 66 69 6e 65 | 64 28 5f 5f 47 4e 55 43 | !define|d(__GNUC|
|00000720| 5f 5f 29 20 26 26 20 64 | 65 66 69 6e 65 64 28 5f |__) && d|efined(_|
|00000730| 41 49 58 29 0a 20 23 70 | 72 61 67 6d 61 20 61 6c |AIX). #p|ragma al|
|00000740| 6c 6f 63 61 0a 23 65 6e | 64 69 66 0a 0a 2f 2a 20 |loca.#en|dif../* |
|00000750| 69 6e 63 6c 75 64 65 20 | 73 79 73 74 65 6d 20 63 |include |system c|
|00000760| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00000770| 6f 72 65 20 61 6c 6c 20 | 65 6c 73 65 2e 20 2a 2f |ore all |else. */|
|00000780| 0a 23 69 6e 63 6c 75 64 | 65 20 22 61 75 74 6f 63 |.#includ|e "autoc|
|00000790| 6f 6e 66 2e 68 22 0a 0a | 23 69 6e 63 6c 75 64 65 |onf.h"..|#include|
|000007a0| 20 22 67 64 62 6d 64 65 | 66 73 2e 68 22 0a 23 69 | "gdbmde|fs.h".#i|
|000007b0| 6e 63 6c 75 64 65 20 22 | 67 64 62 6d 65 72 72 6e |nclude "|gdbmerrn|
|000007c0| 6f 2e 68 22 0a 23 69 6e | 63 6c 75 64 65 20 22 65 |o.h".#in|clude "e|
|000007d0| 78 74 65 72 6e 2e 68 22 | 0a 0a 2f 2a 20 49 6e 69 |xtern.h"|../* Ini|
|000007e0| 74 69 61 6c 69 7a 65 20 | 64 62 6d 20 73 79 73 74 |tialize |dbm syst|
|000007f0| 65 6d 2e 20 20 46 49 4c | 45 20 69 73 20 61 20 70 |em. FIL|E is a p|
|00000800| 6f 69 6e 74 65 72 20 74 | 6f 20 74 68 65 20 66 69 |ointer t|o the fi|
|00000810| 6c 65 20 6e 61 6d 65 2e | 20 20 49 6e 0a 20 20 20 |le name.| In. |
|00000820| 73 74 61 6e 64 61 72 64 | 20 64 62 6d 2c 20 74 68 |standard| dbm, th|
|00000830| 65 20 64 61 74 61 62 61 | 73 65 20 69 73 20 66 6f |e databa|se is fo|
|00000840| 75 6e 64 20 69 6e 20 66 | 69 6c 65 73 20 63 61 6c |und in f|iles cal|
|00000850| 6c 65 64 20 46 49 4c 45 | 2e 70 61 67 20 61 6e 64 |led FILE|.pag and|
|00000860| 0a 20 20 20 46 49 4c 45 | 2e 64 69 72 2e 20 20 54 |. FILE|.dir. T|
|00000870| 6f 20 6d 61 6b 65 20 67 | 64 62 6d 20 63 6f 6d 70 |o make g|dbm comp|
|00000880| 61 74 61 62 6c 65 20 77 | 69 74 68 20 64 62 6d 20 |atable w|ith dbm |
|00000890| 75 73 69 6e 67 20 74 68 | 65 20 64 62 6d 69 6e 69 |using th|e dbmini|
|000008a0| 74 20 63 61 6c 6c 2c 0a | 20 20 20 74 68 65 20 73 |t call,.| the s|
|000008b0| 61 6d 65 20 66 69 6c 65 | 20 6e 61 6d 65 73 20 61 |ame file| names a|
|000008c0| 72 65 20 75 73 65 64 2e | 20 20 53 70 65 63 69 66 |re used.| Specif|
|000008d0| 69 63 61 6c 6c 79 2c 20 | 64 62 6d 69 6e 69 74 20 |ically, |dbminit |
|000008e0| 77 69 6c 6c 20 75 73 65 | 20 74 68 65 20 66 69 6c |will use| the fil|
|000008f0| 65 0a 20 20 20 6e 61 6d | 65 20 46 49 4c 45 2e 70 |e. nam|e FILE.p|
|00000900| 61 67 20 69 6e 20 69 74 | 73 20 63 61 6c 6c 20 74 |ag in it|s call t|
|00000910| 6f 20 67 64 62 6d 20 6f | 70 65 6e 2e 20 20 49 66 |o gdbm o|pen. If|
|00000920| 20 74 68 65 20 66 69 6c | 65 20 28 46 49 4c 45 2e | the fil|e (FILE.|
|00000930| 70 61 67 29 20 68 61 73 | 20 61 0a 20 20 20 73 69 |pag) has| a. si|
|00000940| 7a 65 20 6f 66 20 7a 65 | 72 6f 20 62 79 74 65 73 |ze of ze|ro bytes|
|00000950| 2c 20 61 20 66 69 6c 65 | 20 69 6e 69 74 69 61 6c |, a file| initial|
|00000960| 69 7a 61 74 69 6f 6e 20 | 70 72 6f 63 65 64 75 72 |ization |procedur|
|00000970| 65 20 69 73 20 70 65 72 | 66 6f 72 6d 65 64 2c 0a |e is per|formed,.|
|00000980| 20 20 20 73 65 74 74 69 | 6e 67 20 75 70 20 74 68 | setti|ng up th|
|00000990| 65 20 69 6e 69 74 69 61 | 6c 20 73 74 72 75 63 74 |e initia|l struct|
|000009a0| 75 72 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 2e |ure in t|he file.|
|000009b0| 20 20 41 6e 79 20 65 72 | 72 6f 72 20 64 65 74 65 | Any er|ror dete|
|000009c0| 63 74 65 64 20 77 69 6c | 6c 0a 20 20 20 63 61 75 |cted wil|l. cau|
|000009d0| 73 65 20 61 20 72 65 74 | 75 72 6e 20 76 61 6c 75 |se a ret|urn valu|
|000009e0| 65 20 6f 66 20 2d 31 2e | 20 20 4e 6f 20 65 72 72 |e of -1.| No err|
|000009f0| 6f 72 73 20 63 61 75 73 | 65 20 74 68 65 20 72 65 |ors caus|e the re|
|00000a00| 74 75 72 6e 20 76 61 6c | 75 65 20 6f 66 20 30 2e |turn val|ue of 0.|
|00000a10| 0a 20 20 20 4e 4f 54 45 | 3a 20 66 69 6c 65 2e 64 |. NOTE|: file.d|
|00000a20| 69 72 20 77 69 6c 6c 20 | 62 65 20 6c 69 6e 6b 65 |ir will |be linke|
|00000a30| 64 20 74 6f 20 66 69 6c | 65 2e 70 61 67 2e 20 2a |d to fil|e.pag. *|
|00000a40| 2f 0a 0a 69 6e 74 0a 64 | 62 6d 69 6e 69 74 20 28 |/..int.d|bminit (|
|00000a50| 66 69 6c 65 29 0a 20 20 | 20 20 20 63 68 61 72 20 |file). | char |
|00000a60| 2a 66 69 6c 65 3b 0a 7b | 0a 20 20 63 68 61 72 2a |*file;.{|. char*|
|00000a70| 20 70 61 67 5f 66 69 6c | 65 3b 09 20 20 20 20 2f | pag_fil|e;. /|
|00000a80| 2a 20 55 73 65 64 20 74 | 6f 20 63 6f 6e 73 74 72 |* Used t|o constr|
|00000a90| 75 63 74 20 22 66 69 6c | 65 2e 70 61 67 22 2e 20 |uct "fil|e.pag". |
|00000aa0| 2a 2f 0a 20 20 63 68 61 | 72 2a 20 64 69 72 5f 66 |*/. cha|r* dir_f|
|00000ab0| 69 6c 65 3b 09 20 20 20 | 20 2f 2a 20 55 73 65 64 |ile;. | /* Used|
|00000ac0| 20 74 6f 20 63 6f 6e 73 | 74 72 75 63 74 20 22 66 | to cons|truct "f|
|00000ad0| 69 6c 65 2e 64 69 72 22 | 2e 20 2a 2f 0a 20 20 73 |ile.dir"|. */. s|
|00000ae0| 74 72 75 63 74 20 73 74 | 61 74 20 64 69 72 5f 73 |truct st|at dir_s|
|00000af0| 74 61 74 3b 09 20 20 20 | 20 2f 2a 20 53 74 61 74 |tat;. | /* Stat|
|00000b00| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 66 6f 72 | informa|tion for|
|00000b10| 20 22 66 69 6c 65 2e 64 | 69 72 22 2e 20 2a 2f 0a | "file.d|ir". */.|
|00000b20| 0a 0a 20 20 2f 2a 20 50 | 72 65 70 61 72 65 20 74 |.. /* P|repare t|
|00000b30| 68 65 20 63 6f 72 72 65 | 63 74 20 6e 61 6d 65 73 |he corre|ct names|
|00000b40| 20 6f 66 20 22 66 69 6c | 65 2e 70 61 67 22 20 61 | of "fil|e.pag" a|
|00000b50| 6e 64 20 22 66 69 6c 65 | 2e 64 69 72 22 2e 20 2a |nd "file|.dir". *|
|00000b60| 2f 0a 20 20 70 61 67 5f | 66 69 6c 65 20 3d 20 28 |/. pag_|file = (|
|00000b70| 63 68 61 72 20 2a 29 20 | 61 6c 6c 6f 63 61 20 28 |char *) |alloca (|
|00000b80| 73 74 72 6c 65 6e 20 28 | 66 69 6c 65 29 2b 35 29 |strlen (|file)+5)|
|00000b90| 3b 0a 20 20 64 69 72 5f | 66 69 6c 65 20 3d 20 28 |;. dir_|file = (|
|00000ba0| 63 68 61 72 20 2a 29 20 | 61 6c 6c 6f 63 61 20 28 |char *) |alloca (|
|00000bb0| 73 74 72 6c 65 6e 20 28 | 66 69 6c 65 29 2b 35 29 |strlen (|file)+5)|
|00000bc0| 3b 0a 0a 20 20 73 74 72 | 63 70 79 20 28 70 61 67 |;.. str|cpy (pag|
|00000bd0| 5f 66 69 6c 65 2c 20 66 | 69 6c 65 29 3b 0a 20 20 |_file, f|ile);. |
|00000be0| 73 74 72 63 61 74 20 28 | 70 61 67 5f 66 69 6c 65 |strcat (|pag_file|
|00000bf0| 2c 20 22 2e 70 61 67 22 | 29 3b 0a 20 20 73 74 72 |, ".pag"|);. str|
|00000c00| 63 70 79 20 28 64 69 72 | 5f 66 69 6c 65 2c 20 66 |cpy (dir|_file, f|
|00000c10| 69 6c 65 29 3b 0a 20 20 | 73 74 72 63 61 74 20 28 |ile);. |strcat (|
|00000c20| 64 69 72 5f 66 69 6c 65 | 2c 20 22 2e 64 69 72 22 |dir_file|, ".dir"|
|00000c30| 29 3b 0a 0a 20 20 69 66 | 20 28 5f 67 64 62 6d 5f |);.. if| (_gdbm_|
|00000c40| 66 69 6c 65 20 21 3d 20 | 4e 55 4c 4c 29 0a 20 20 |file != |NULL). |
|00000c50| 20 20 67 64 62 6d 5f 63 | 6c 6f 73 65 20 28 5f 67 | gdbm_c|lose (_g|
|00000c60| 64 62 6d 5f 66 69 6c 65 | 29 3b 0a 0a 20 20 2f 2a |dbm_file|);.. /*|
|00000c70| 20 54 72 79 20 74 6f 20 | 6f 70 65 6e 20 74 68 65 | Try to |open the|
|00000c80| 20 66 69 6c 65 20 61 73 | 20 61 20 77 72 69 74 65 | file as| a write|
|00000c90| 72 2e 20 20 44 42 4d 20 | 6e 65 76 65 72 20 63 72 |r. DBM |never cr|
|00000ca0| 65 61 74 65 64 20 61 20 | 66 69 6c 65 2e 20 2a 2f |eated a |file. */|
|00000cb0| 0a 20 20 5f 67 64 62 6d | 5f 66 69 6c 65 20 3d 20 |. _gdbm|_file = |
|00000cc0| 67 64 62 6d 5f 6f 70 65 | 6e 20 28 70 61 67 5f 66 |gdbm_ope|n (pag_f|
|00000cd0| 69 6c 65 2c 20 30 2c 20 | 47 44 42 4d 5f 57 52 49 |ile, 0, |GDBM_WRI|
|00000ce0| 54 45 52 2c 20 30 2c 20 | 4e 55 4c 4c 29 3b 0a 0a |TER, 0, |NULL);..|
|00000cf0| 20 20 2f 2a 20 49 66 20 | 69 74 20 77 61 73 20 6e | /* If |it was n|
|00000d00| 6f 74 20 6f 70 65 6e 65 | 64 2c 20 74 72 79 20 6f |ot opene|d, try o|
|00000d10| 70 65 6e 69 6e 67 20 69 | 74 20 61 73 20 61 20 72 |pening i|t as a r|
|00000d20| 65 61 64 65 72 2e 20 2a | 2f 0a 20 20 69 66 20 28 |eader. *|/. if (|
|00000d30| 5f 67 64 62 6d 5f 66 69 | 6c 65 20 3d 3d 20 4e 55 |_gdbm_fi|le == NU|
|00000d40| 4c 4c 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 20 20 |LL). |{. |
|00000d50| 5f 67 64 62 6d 5f 66 69 | 6c 65 20 3d 20 67 64 62 |_gdbm_fi|le = gdb|
|00000d60| 6d 5f 6f 70 65 6e 20 28 | 70 61 67 5f 66 69 6c 65 |m_open (|pag_file|
|00000d70| 2c 20 30 2c 20 47 44 42 | 4d 5f 52 45 41 44 45 52 |, 0, GDB|M_READER|
|00000d80| 2c 20 30 2c 20 4e 55 4c | 4c 29 3b 0a 20 20 0a 20 |, 0, NUL|L);. . |
|00000d90| 20 20 20 20 20 2f 2a 20 | 44 69 64 20 77 65 20 73 | /* |Did we s|
|00000da0| 75 63 63 65 73 73 66 75 | 6c 6c 79 20 6f 70 65 6e |uccessfu|lly open|
|00000db0| 20 74 68 65 20 66 69 6c | 65 3f 20 2a 2f 0a 20 20 | the fil|e? */. |
|00000dc0| 20 20 20 20 69 66 20 28 | 5f 67 64 62 6d 5f 66 69 | if (|_gdbm_fi|
|00000dd0| 6c 65 20 3d 3d 20 4e 55 | 4c 4c 29 0a 09 7b 0a 09 |le == NU|LL)..{..|
|00000de0| 20 20 67 64 62 6d 5f 65 | 72 72 6e 6f 20 3d 20 47 | gdbm_e|rrno = G|
|00000df0| 44 42 4d 5f 46 49 4c 45 | 5f 4f 50 45 4e 5f 45 52 |DBM_FILE|_OPEN_ER|
|00000e00| 52 4f 52 3b 0a 09 20 20 | 72 65 74 75 72 6e 20 2d |ROR;.. |return -|
|00000e10| 31 3b 0a 09 7d 0a 20 20 | 20 20 7d 0a 0a 20 20 2f |1;..}. | }.. /|
|00000e20| 2a 20 49 66 20 74 68 65 | 20 64 61 74 61 62 61 73 |* If the| databas|
|00000e30| 65 20 69 73 20 6e 65 77 | 2c 20 6c 69 6e 6b 20 22 |e is new|, link "|
|00000e40| 66 69 6c 65 2e 64 69 72 | 22 20 74 6f 20 22 66 69 |file.dir|" to "fi|
|00000e50| 6c 65 2e 70 61 67 22 2e | 20 54 68 69 73 20 69 73 |le.pag".| This is|
|00000e60| 20 64 6f 6e 65 0a 20 20 | 20 20 20 73 6f 20 74 68 | done. | so th|
|00000e70| 65 20 74 69 6d 65 20 73 | 74 61 6d 70 20 6f 6e 20 |e time s|tamp on |
|00000e80| 62 6f 74 68 20 66 69 6c | 65 73 20 69 73 20 74 68 |both fil|es is th|
|00000e90| 65 20 73 61 6d 65 2e 20 | 2a 2f 0a 20 20 69 66 20 |e same. |*/. if |
|00000ea0| 28 73 74 61 74 20 28 64 | 69 72 5f 66 69 6c 65 2c |(stat (d|ir_file,|
|00000eb0| 20 26 64 69 72 5f 73 74 | 61 74 29 20 3d 3d 20 30 | &dir_st|at) == 0|
|00000ec0| 29 0a 20 20 20 20 7b 0a | 20 20 20 20 20 20 69 66 |). {.| if|
|00000ed0| 20 28 64 69 72 5f 73 74 | 61 74 2e 73 74 5f 73 69 | (dir_st|at.st_si|
|00000ee0| 7a 65 20 3d 3d 20 30 29 | 0a 09 69 66 20 28 75 6e |ze == 0)|..if (un|
|00000ef0| 6c 69 6e 6b 20 28 64 69 | 72 5f 66 69 6c 65 29 20 |link (di|r_file) |
|00000f00| 21 3d 20 30 20 7c 7c 20 | 6c 69 6e 6b 20 28 70 61 |!= 0 || |link (pa|
|00000f10| 67 5f 66 69 6c 65 2c 20 | 64 69 72 5f 66 69 6c 65 |g_file, |dir_file|
|00000f20| 29 20 21 3d 20 30 29 0a | 09 20 20 7b 0a 09 20 20 |) != 0).|. {.. |
|00000f30| 20 20 67 64 62 6d 5f 65 | 72 72 6e 6f 20 3d 20 47 | gdbm_e|rrno = G|
|00000f40| 44 42 4d 5f 46 49 4c 45 | 5f 4f 50 45 4e 5f 45 52 |DBM_FILE|_OPEN_ER|
|00000f50| 52 4f 52 3b 0a 09 20 20 | 20 20 67 64 62 6d 5f 63 |ROR;.. | gdbm_c|
|00000f60| 6c 6f 73 65 20 28 5f 67 | 64 62 6d 5f 66 69 6c 65 |lose (_g|dbm_file|
|00000f70| 29 3b 0a 09 20 20 20 20 | 72 65 74 75 72 6e 20 2d |);.. |return -|
|00000f80| 31 3b 0a 09 20 20 7d 0a | 20 20 20 20 7d 0a 20 20 |1;.. }.| }. |
|00000f90| 65 6c 73 65 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |else. | {. |
|00000fa0| 20 2f 2a 20 53 69 6e 63 | 65 20 77 65 20 63 61 6e | /* Sinc|e we can|
|00000fb0| 27 74 20 73 74 61 74 20 | 69 74 2c 20 77 65 20 61 |'t stat |it, we a|
|00000fc0| 73 73 75 6d 65 20 69 74 | 20 69 73 20 6e 6f 74 20 |ssume it| is not |
|00000fd0| 74 68 65 72 65 20 61 6e | 64 20 74 72 79 0a 20 20 |there an|d try. |
|00000fe0| 20 20 20 20 20 20 20 74 | 6f 20 6c 69 6e 6b 20 74 | t|o link t|
|00000ff0| 68 65 20 64 69 72 5f 66 | 69 6c 65 20 74 6f 20 74 |he dir_f|ile to t|
|00001000| 68 65 20 70 61 67 5f 66 | 69 6c 65 2e 20 2a 2f 0a |he pag_f|ile. */.|
|00001010| 20 20 20 20 20 20 69 66 | 20 28 6c 69 6e 6b 20 28 | if| (link (|
|00001020| 70 61 67 5f 66 69 6c 65 | 2c 20 64 69 72 5f 66 69 |pag_file|, dir_fi|
|00001030| 6c 65 29 20 21 3d 20 30 | 29 0a 09 7b 0a 09 20 20 |le) != 0|)..{.. |
|00001040| 67 64 62 6d 5f 65 72 72 | 6e 6f 20 3d 20 47 44 42 |gdbm_err|no = GDB|
|00001050| 4d 5f 46 49 4c 45 5f 4f | 50 45 4e 5f 45 52 52 4f |M_FILE_O|PEN_ERRO|
|00001060| 52 3b 0a 09 20 20 67 64 | 62 6d 5f 63 6c 6f 73 65 |R;.. gd|bm_close|
|00001070| 20 28 5f 67 64 62 6d 5f | 66 69 6c 65 29 3b 0a 09 | (_gdbm_|file);..|
|00001080| 20 20 72 65 74 75 72 6e | 20 2d 31 3b 0a 09 7d 0a | return| -1;..}.|
|00001090| 20 20 20 20 7d 0a 09 20 | 20 20 20 0a 20 20 72 65 | }.. | . re|
|000010a0| 74 75 72 6e 20 30 3b 0a | 7d 0a 00 00 00 00 00 00 |turn 0;.|}.......|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 64 65 6c 65 74 |gdbm-1.7|.3/delet|
|00001210| 65 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.c.....|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00001270| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00001280| 20 20 20 32 37 36 30 20 | 20 35 35 30 37 33 30 34 | 2760 | 5507304|
|00001290| 31 36 33 20 20 20 37 31 | 34 36 00 20 00 00 00 00 |163 71|46. ....|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 2f 2a 20 64 65 6c 65 74 | 65 2e 63 20 2d 20 52 65 |/* delet|e.c - Re|
|00001410| 6d 6f 76 65 20 74 68 65 | 20 6b 65 79 20 61 6e 64 |move the| key and|
|00001420| 20 69 74 73 20 61 73 73 | 6f 63 69 61 74 65 64 20 | its ass|ociated |
|00001430| 64 61 74 61 20 66 72 6f | 6d 20 74 68 65 20 64 61 |data fro|m the da|
|00001440| 74 61 62 61 73 65 2e 0a | 20 20 20 54 68 69 73 20 |tabase..| This |
|00001450| 69 73 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |is the o|riginal |
|00001460| 75 6e 69 78 20 69 6e 74 | 65 72 66 61 63 65 20 6e |unix int|erface n|
|00001470| 61 6d 65 2e 20 20 2a 2f | 0a 0a 2f 2a 20 20 54 68 |ame. */|../* Th|
|00001480| 69 73 20 66 69 6c 65 20 | 69 73 20 70 61 72 74 20 |is file |is part |
|00001490| 6f 66 20 47 44 42 4d 2c | 20 74 68 65 20 47 4e 55 |of GDBM,| the GNU|
|000014a0| 20 64 61 74 61 20 62 61 | 73 65 20 6d 61 6e 61 67 | data ba|se manag|
|000014b0| 65 72 2c 20 62 79 20 50 | 68 69 6c 69 70 20 41 2e |er, by P|hilip A.|
|000014c0| 20 4e 65 6c 73 6f 6e 2e | 0a 20 20 20 20 43 6f 70 | Nelson.|. Cop|
|000014d0| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 39 30 2c |yright (|C) 1990,|
|000014e0| 20 31 39 39 31 2c 20 31 | 39 39 33 20 20 46 72 65 | 1991, 1|993 Fre|
|000014f0| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|00001500| 61 74 69 6f 6e 2c 20 49 | 6e 63 2e 0a 0a 20 20 20 |ation, I|nc... |
|00001510| 20 47 44 42 4d 20 69 73 | 20 66 72 65 65 20 73 6f | GDBM is| free so|
|00001520| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|00001530| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00001540| 61 6e 64 2f 6f 72 20 6d | 6f 64 69 66 79 0a 20 20 |and/or m|odify. |
|00001550| 20 20 69 74 20 75 6e 64 | 65 72 20 74 68 65 20 74 | it und|er the t|
|00001560| 65 72 6d 73 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |erms of |the GNU |
|00001570| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00001580| 69 63 65 6e 73 65 20 61 | 73 20 70 75 62 6c 69 73 |icense a|s publis|
|00001590| 68 65 64 20 62 79 0a 20 | 20 20 20 74 68 65 20 46 |hed by. | the F|
|000015a0| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|000015b0| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|000015c0| 76 65 72 73 69 6f 6e 20 | 32 2c 20 6f 72 20 28 61 |version |2, or (a|
|000015d0| 74 20 79 6f 75 72 20 6f | 70 74 69 6f 6e 29 0a 20 |t your o|ption). |
|000015e0| 20 20 20 61 6e 79 20 6c | 61 74 65 72 20 76 65 72 | any l|ater ver|
|000015f0| 73 69 6f 6e 2e 0a 0a 20 | 20 20 20 47 44 42 4d 20 |sion... | GDBM |
|00001600| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|00001610| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|00001620| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|00001630| 6c 2c 0a 20 20 20 20 62 | 75 74 20 57 49 54 48 4f |l,. b|ut WITHO|
|00001640| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|00001650| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|00001660| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|00001670| 74 79 20 6f 66 0a 20 20 | 20 20 4d 45 52 43 48 41 |ty of. | MERCHA|
|00001680| 4e 54 41 42 49 4c 49 54 | 59 20 6f 72 20 46 49 54 |NTABILIT|Y or FIT|
|00001690| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|000016a0| 43 55 4c 41 52 20 50 55 | 52 50 4f 53 45 2e 20 20 |CULAR PU|RPOSE. |
|000016b0| 53 65 65 20 74 68 65 0a | 20 20 20 20 47 4e 55 20 |See the.| GNU |
|000016c0| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|000016d0| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|000016e0| 64 65 74 61 69 6c 73 2e | 0a 0a 20 20 20 20 59 6f |details.|.. Yo|
|000016f0| 75 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 72 65 |u should| have re|
|00001700| 63 65 69 76 65 64 20 61 | 20 63 6f 70 79 20 6f 66 |ceived a| copy of|
|00001710| 20 74 68 65 20 47 4e 55 | 20 47 65 6e 65 72 61 6c | the GNU| General|
|00001720| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 0a | Public |License.|
|00001730| 20 20 20 20 61 6c 6f 6e | 67 20 77 69 74 68 20 47 | alon|g with G|
|00001740| 44 42 4d 3b 20 73 65 65 | 20 74 68 65 20 66 69 6c |DBM; see| the fil|
|00001750| 65 20 43 4f 50 59 49 4e | 47 2e 20 20 49 66 20 6e |e COPYIN|G. If n|
|00001760| 6f 74 2c 20 77 72 69 74 | 65 20 74 6f 0a 20 20 20 |ot, writ|e to. |
|00001770| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00001780| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 36 |re Found|ation, 6|
|00001790| 37 35 20 4d 61 73 73 20 | 41 76 65 2c 20 43 61 6d |75 Mass |Ave, Cam|
|000017a0| 62 72 69 64 67 65 2c 20 | 4d 41 20 30 32 31 33 39 |bridge, |MA 02139|
|000017b0| 2c 20 55 53 41 2e 0a 0a | 20 20 20 20 59 6f 75 20 |, USA...| You |
|000017c0| 6d 61 79 20 63 6f 6e 74 | 61 63 74 20 74 68 65 20 |may cont|act the |
|000017d0| 61 75 74 68 6f 72 20 62 | 79 3a 0a 20 20 20 20 20 |author b|y:. |
|000017e0| 20 20 65 2d 6d 61 69 6c | 3a 20 20 70 68 69 6c 40 | e-mail|: phil@|
|000017f0| 63 73 2e 77 77 75 2e 65 | 64 75 0a 20 20 20 20 20 |cs.wwu.e|du. |
|00001800| 20 75 73 2d 6d 61 69 6c | 3a 20 20 50 68 69 6c 69 | us-mail|: Phili|
|00001810| 70 20 41 2e 20 4e 65 6c | 73 6f 6e 0a 20 20 20 20 |p A. Nel|son. |
|00001820| 20 20 20 20 20 20 20 20 | 20 20 20 20 43 6f 6d 70 | | Comp|
|00001830| 75 74 65 72 20 53 63 69 | 65 6e 63 65 20 44 65 70 |uter Sci|ence Dep|
|00001840| 61 72 74 6d 65 6e 74 0a | 20 20 20 20 20 20 20 20 |artment.| |
|00001850| 20 20 20 20 20 20 20 20 | 57 65 73 74 65 72 6e 20 | |Western |
|00001860| 57 61 73 68 69 6e 67 74 | 6f 6e 20 55 6e 69 76 65 |Washingt|on Unive|
|00001870| 72 73 69 74 79 0a 20 20 | 20 20 20 20 20 20 20 20 |rsity. | |
|00001880| 20 20 20 20 20 20 42 65 | 6c 6c 69 6e 67 68 61 6d | Be|llingham|
|00001890| 2c 20 57 41 20 39 38 32 | 32 36 0a 20 20 20 20 20 |, WA 982|26. |
|000018a0| 20 20 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .*****|********|
|000018b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 0a 0a |********|****/...|
|000018f0| 2f 2a 20 69 6e 63 6c 75 | 64 65 20 73 79 73 74 65 |/* inclu|de syste|
|00001900| 6d 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |m config|uration |
|00001910| 62 65 66 6f 72 65 20 61 | 6c 6c 20 65 6c 73 65 2e |before a|ll else.|
|00001920| 20 2a 2f 0a 23 69 6e 63 | 6c 75 64 65 20 22 61 75 | */.#inc|lude "au|
|00001930| 74 6f 63 6f 6e 66 2e 68 | 22 0a 0a 23 69 6e 63 6c |toconf.h|"..#incl|
|00001940| 75 64 65 20 22 67 64 62 | 6d 64 65 66 73 2e 68 22 |ude "gdb|mdefs.h"|
|00001950| 0a 23 69 6e 63 6c 75 64 | 65 20 22 65 78 74 65 72 |.#includ|e "exter|
|00001960| 6e 2e 68 22 0a 0a 0a 2f | 2a 20 52 65 6d 6f 76 65 |n.h".../|* Remove|
|00001970| 20 74 68 65 20 4b 45 59 | 65 64 20 69 74 65 6d 20 | the KEY|ed item |
|00001980| 61 6e 64 20 74 68 65 20 | 4b 45 59 20 66 72 6f 6d |and the |KEY from|
|00001990| 20 74 68 65 20 64 61 74 | 61 62 61 73 65 2e 20 2a | the dat|abase. *|
|000019a0| 2f 0a 0a 69 6e 74 0a 64 | 65 6c 65 74 65 20 28 6b |/..int.d|elete (k|
|000019b0| 65 79 29 0a 20 20 20 20 | 20 64 61 74 75 6d 20 6b |ey). | datum k|
|000019c0| 65 79 3b 0a 7b 0a 20 20 | 72 65 74 75 72 6e 20 67 |ey;.{. |return g|
|000019d0| 64 62 6d 5f 64 65 6c 65 | 74 65 20 28 5f 67 64 62 |dbm_dele|te (_gdb|
|000019e0| 6d 5f 66 69 6c 65 2c 20 | 6b 65 79 29 3b 0a 7d 0a |m_file, |key);.}.|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 66 65 74 63 68 |gdbm-1.7|.3/fetch|
|00001a10| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00001a70| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00001a80| 20 20 20 33 37 35 36 20 | 20 35 35 30 37 33 30 34 | 3756 | 5507304|
|00001a90| 33 33 34 20 20 20 37 30 | 30 33 00 20 00 00 00 00 |334 70|03. ....|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 2f 2a 20 66 65 74 63 68 | 2e 63 20 2d 20 46 69 6e |/* fetch|.c - Fin|
|00001c10| 64 20 61 20 6b 65 79 20 | 61 6e 64 20 72 65 74 75 |d a key |and retu|
|00001c20| 72 6e 20 74 68 65 20 61 | 73 73 6f 63 69 61 74 65 |rn the a|ssociate|
|00001c30| 64 20 64 61 74 61 2e 20 | 20 2a 2f 0a 0a 2f 2a 20 |d data. | */../* |
|00001c40| 20 54 68 69 73 20 66 69 | 6c 65 20 69 73 20 70 61 | This fi|le is pa|
|00001c50| 72 74 20 6f 66 20 47 44 | 42 4d 2c 20 74 68 65 20 |rt of GD|BM, the |
|00001c60| 47 4e 55 20 64 61 74 61 | 20 62 61 73 65 20 6d 61 |GNU data| base ma|
|00001c70| 6e 61 67 65 72 2c 20 62 | 79 20 50 68 69 6c 69 70 |nager, b|y Philip|
|00001c80| 20 41 2e 20 4e 65 6c 73 | 6f 6e 2e 0a 20 20 20 20 | A. Nels|on.. |
|00001c90| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00001ca0| 39 30 2c 20 31 39 39 31 | 2c 20 31 39 39 33 20 20 |90, 1991|, 1993 |
|00001cb0| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00001cc0| 75 6e 64 61 74 69 6f 6e | 2c 20 49 6e 63 2e 0a 0a |undation|, Inc...|
|00001cd0| 20 20 20 20 47 44 42 4d | 20 69 73 20 66 72 65 65 | GDBM| is free|
|00001ce0| 20 73 6f 66 74 77 61 72 | 65 3b 20 79 6f 75 20 63 | softwar|e; you c|
|00001cf0| 61 6e 20 72 65 64 69 73 | 74 72 69 62 75 74 65 20 |an redis|tribute |
|00001d00| 69 74 20 61 6e 64 2f 6f | 72 20 6d 6f 64 69 66 79 |it and/o|r modify|
|00001d10| 0a 20 20 20 20 69 74 20 | 75 6e 64 65 72 20 74 68 |. it |under th|
|00001d20| 65 20 74 65 72 6d 73 20 | 6f 66 20 74 68 65 20 47 |e terms |of the G|
|00001d30| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00001d40| 63 20 4c 69 63 65 6e 73 | 65 20 61 73 20 70 75 62 |c Licens|e as pub|
|00001d50| 6c 69 73 68 65 64 20 62 | 79 0a 20 20 20 20 74 68 |lished b|y. th|
|00001d60| 65 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |e Free S|oftware |
|00001d70| 46 6f 75 6e 64 61 74 69 | 6f 6e 3b 20 65 69 74 68 |Foundati|on; eith|
|00001d80| 65 72 20 76 65 72 73 69 | 6f 6e 20 32 2c 20 6f 72 |er versi|on 2, or|
|00001d90| 20 28 61 74 20 79 6f 75 | 72 20 6f 70 74 69 6f 6e | (at you|r option|
|00001da0| 29 0a 20 20 20 20 61 6e | 79 20 6c 61 74 65 72 20 |). an|y later |
|00001db0| 76 65 72 73 69 6f 6e 2e | 0a 0a 20 20 20 20 47 44 |version.|.. GD|
|00001dc0| 42 4d 20 69 73 20 64 69 | 73 74 72 69 62 75 74 65 |BM is di|stribute|
|00001dd0| 64 20 69 6e 20 74 68 65 | 20 68 6f 70 65 20 74 68 |d in the| hope th|
|00001de0| 61 74 20 69 74 20 77 69 | 6c 6c 20 62 65 20 75 73 |at it wi|ll be us|
|00001df0| 65 66 75 6c 2c 0a 20 20 | 20 20 62 75 74 20 57 49 |eful,. | but WI|
|00001e00| 54 48 4f 55 54 20 41 4e | 59 20 57 41 52 52 41 4e |THOUT AN|Y WARRAN|
|00001e10| 54 59 3b 20 77 69 74 68 | 6f 75 74 20 65 76 65 6e |TY; with|out even|
|00001e20| 20 74 68 65 20 69 6d 70 | 6c 69 65 64 20 77 61 72 | the imp|lied war|
|00001e30| 72 61 6e 74 79 20 6f 66 | 0a 20 20 20 20 4d 45 52 |ranty of|. MER|
|00001e40| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 6f 72 20 |CHANTABI|LITY or |
|00001e50| 46 49 54 4e 45 53 53 20 | 46 4f 52 20 41 20 50 41 |FITNESS |FOR A PA|
|00001e60| 52 54 49 43 55 4c 41 52 | 20 50 55 52 50 4f 53 45 |RTICULAR| PURPOSE|
|00001e70| 2e 20 20 53 65 65 20 74 | 68 65 0a 20 20 20 20 47 |. See t|he. G|
|00001e80| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00001e90| 63 20 4c 69 63 65 6e 73 | 65 20 66 6f 72 20 6d 6f |c Licens|e for mo|
|00001ea0| 72 65 20 64 65 74 61 69 | 6c 73 2e 0a 0a 20 20 20 |re detai|ls... |
|00001eb0| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 68 61 76 65 | You sho|uld have|
|00001ec0| 20 72 65 63 65 69 76 65 | 64 20 61 20 63 6f 70 79 | receive|d a copy|
|00001ed0| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 | of the |GNU Gene|
|00001ee0| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00001ef0| 73 65 0a 20 20 20 20 61 | 6c 6f 6e 67 20 77 69 74 |se. a|long wit|
|00001f00| 68 20 47 44 42 4d 3b 20 | 73 65 65 20 74 68 65 20 |h GDBM; |see the |
|00001f10| 66 69 6c 65 20 43 4f 50 | 59 49 4e 47 2e 20 20 49 |file COP|YING. I|
|00001f20| 66 20 6e 6f 74 2c 20 77 | 72 69 74 65 20 74 6f 0a |f not, w|rite to.|
|00001f30| 20 20 20 20 74 68 65 20 | 46 72 65 65 20 53 6f 66 | the |Free Sof|
|00001f40| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|00001f50| 2c 20 36 37 35 20 4d 61 | 73 73 20 41 76 65 2c 20 |, 675 Ma|ss Ave, |
|00001f60| 43 61 6d 62 72 69 64 67 | 65 2c 20 4d 41 20 30 32 |Cambridg|e, MA 02|
|00001f70| 31 33 39 2c 20 55 53 41 | 2e 0a 0a 20 20 20 20 59 |139, USA|... Y|
|00001f80| 6f 75 20 6d 61 79 20 63 | 6f 6e 74 61 63 74 20 74 |ou may c|ontact t|
|00001f90| 68 65 20 61 75 74 68 6f | 72 20 62 79 3a 0a 20 20 |he autho|r by:. |
|00001fa0| 20 20 20 20 20 65 2d 6d | 61 69 6c 3a 20 20 70 68 | e-m|ail: ph|
|00001fb0| 69 6c 40 63 73 2e 77 77 | 75 2e 65 64 75 0a 20 20 |il@cs.ww|u.edu. |
|00001fc0| 20 20 20 20 75 73 2d 6d | 61 69 6c 3a 20 20 50 68 | us-m|ail: Ph|
|00001fd0| 69 6c 69 70 20 41 2e 20 | 4e 65 6c 73 6f 6e 0a 20 |ilip A. |Nelson. |
|00001fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 43 | | C|
|00001ff0| 6f 6d 70 75 74 65 72 20 | 53 63 69 65 6e 63 65 20 |omputer |Science |
|00002000| 44 65 70 61 72 74 6d 65 | 6e 74 0a 20 20 20 20 20 |Departme|nt. |
|00002010| 20 20 20 20 20 20 20 20 | 20 20 20 57 65 73 74 65 | | Weste|
|00002020| 72 6e 20 57 61 73 68 69 | 6e 67 74 6f 6e 20 55 6e |rn Washi|ngton Un|
|00002030| 69 76 65 72 73 69 74 79 | 0a 20 20 20 20 20 20 20 |iversity|. |
|00002040| 20 20 20 20 20 20 20 20 | 20 42 65 6c 6c 69 6e 67 | | Belling|
|00002050| 68 61 6d 2c 20 57 41 20 | 39 38 32 32 36 0a 20 20 |ham, WA |98226. |
|00002060| 20 20 20 20 20 0a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .**|********|
|00002070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000020a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|000020b0| 0a 0a 0a 2f 2a 20 41 49 | 58 20 64 65 6d 61 6e 64 |.../* AI|X demand|
|000020c0| 73 20 74 68 69 73 20 62 | 65 20 74 68 65 20 76 65 |s this b|e the ve|
|000020d0| 72 79 20 66 69 72 73 74 | 20 74 68 69 6e 67 20 69 |ry first| thing i|
|000020e0| 6e 20 74 68 65 20 66 69 | 6c 65 2e 20 2a 2f 0a 23 |n the fi|le. */.#|
|000020f0| 69 66 20 21 64 65 66 69 | 6e 65 64 28 5f 5f 47 4e |if !defi|ned(__GN|
|00002100| 55 43 5f 5f 29 20 26 26 | 20 64 65 66 69 6e 65 64 |UC__) &&| defined|
|00002110| 28 5f 41 49 58 29 0a 20 | 23 70 72 61 67 6d 61 20 |(_AIX). |#pragma |
|00002120| 61 6c 6c 6f 63 61 0a 23 | 65 6e 64 69 66 0a 0a 2f |alloca.#|endif../|
|00002130| 2a 20 69 6e 63 6c 75 64 | 65 20 73 79 73 74 65 6d |* includ|e system|
|00002140| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00002150| 65 66 6f 72 65 20 61 6c | 6c 20 65 6c 73 65 2e 20 |efore al|l else. |
|00002160| 2a 2f 0a 23 69 6e 63 6c | 75 64 65 20 22 61 75 74 |*/.#incl|ude "aut|
|00002170| 6f 63 6f 6e 66 2e 68 22 | 0a 0a 23 69 6e 63 6c 75 |oconf.h"|..#inclu|
|00002180| 64 65 20 22 67 64 62 6d | 64 65 66 73 2e 68 22 0a |de "gdbm|defs.h".|
|00002190| 23 69 6e 63 6c 75 64 65 | 20 22 65 78 74 65 72 6e |#include| "extern|
|000021a0| 2e 68 22 0a 0a 0a 2f 2a | 20 4c 6f 6f 6b 20 75 70 |.h".../*| Look up|
|000021b0| 20 61 20 67 69 76 65 6e | 20 4b 45 59 20 61 6e 64 | a given| KEY and|
|000021c0| 20 72 65 74 75 72 6e 20 | 74 68 65 20 69 6e 66 6f | return |the info|
|000021d0| 72 6d 61 74 69 6f 6e 20 | 61 73 73 6f 63 69 61 74 |rmation |associat|
|000021e0| 65 64 20 77 69 74 68 20 | 74 68 61 74 20 4b 45 59 |ed with |that KEY|
|000021f0| 2e 0a 20 20 20 54 68 65 | 20 70 6f 69 6e 74 65 72 |.. The| pointer|
|00002200| 20 69 6e 20 74 68 65 20 | 73 74 72 75 63 74 75 72 | in the |structur|
|00002210| 65 20 74 68 61 74 20 69 | 73 20 20 72 65 74 75 72 |e that i|s retur|
|00002220| 6e 65 64 20 69 73 20 61 | 20 70 6f 69 6e 74 65 72 |ned is a| pointer|
|00002230| 20 74 6f 20 64 79 6e 61 | 6d 69 63 61 6c 6c 79 0a | to dyna|mically.|
|00002240| 20 20 20 61 6c 6c 6f 63 | 61 74 65 64 20 6d 65 6d | alloc|ated mem|
|00002250| 6f 72 79 20 62 6c 6f 63 | 6b 2e 20 20 54 68 69 73 |ory bloc|k. This|
|00002260| 20 44 42 4d 20 69 6e 74 | 65 72 66 61 63 65 20 75 | DBM int|erface u|
|00002270| 73 65 73 20 74 68 65 20 | 4e 44 42 4d 20 69 6e 74 |ses the |NDBM int|
|00002280| 65 72 66 61 63 65 2e 20 | 2a 2f 0a 0a 64 61 74 75 |erface. |*/..datu|
|00002290| 6d 0a 66 65 74 63 68 20 | 28 6b 65 79 29 0a 20 20 |m.fetch |(key). |
|000022a0| 20 20 20 64 61 74 75 6d | 20 6b 65 79 3b 0a 7b 0a | datum| key;.{.|
|000022b0| 20 20 64 61 74 75 6d 20 | 20 72 65 74 5f 76 61 6c | datum | ret_val|
|000022c0| 3b 09 09 2f 2a 20 54 68 | 65 20 72 65 74 75 72 6e |;../* Th|e return|
|000022d0| 20 76 61 6c 75 65 2e 20 | 2a 2f 0a 0a 20 20 2f 2a | value. |*/.. /*|
|000022e0| 20 46 72 65 65 20 70 72 | 65 76 69 6f 75 73 20 64 | Free pr|evious d|
|000022f0| 79 6e 61 6d 69 63 20 6d | 65 6d 6f 72 79 2c 20 64 |ynamic m|emory, d|
|00002300| 6f 20 61 63 74 75 61 6c | 20 63 61 6c 6c 2c 20 61 |o actual| call, a|
|00002310| 6e 64 20 73 61 76 65 20 | 70 6f 69 6e 74 65 72 20 |nd save |pointer |
|00002320| 74 6f 20 6e 65 77 0a 20 | 20 20 20 20 6d 65 6d 6f |to new. | memo|
|00002330| 72 79 2e 20 2a 2f 0a 20 | 20 72 65 74 5f 76 61 6c |ry. */. | ret_val|
|00002340| 20 3d 20 67 64 62 6d 5f | 66 65 74 63 68 20 28 5f | = gdbm_|fetch (_|
|00002350| 67 64 62 6d 5f 66 69 6c | 65 2c 20 6b 65 79 29 3b |gdbm_fil|e, key);|
|00002360| 0a 20 20 69 66 20 28 5f | 67 64 62 6d 5f 66 65 74 |. if (_|gdbm_fet|
|00002370| 63 68 5f 76 61 6c 20 21 | 3d 20 4e 55 4c 4c 29 20 |ch_val !|= NULL) |
|00002380| 66 72 65 65 20 28 5f 67 | 64 62 6d 5f 66 65 74 63 |free (_g|dbm_fetc|
|00002390| 68 5f 76 61 6c 29 3b 0a | 20 20 5f 67 64 62 6d 5f |h_val);.| _gdbm_|
|000023a0| 66 65 74 63 68 5f 76 61 | 6c 20 3d 20 72 65 74 5f |fetch_va|l = ret_|
|000023b0| 76 61 6c 2e 64 70 74 72 | 3b 0a 0a 20 20 2f 2a 20 |val.dptr|;.. /* |
|000023c0| 52 65 74 75 72 6e 20 74 | 68 65 20 6e 65 77 20 76 |Return t|he new v|
|000023d0| 61 6c 75 65 2e 20 2a 2f | 0a 20 20 72 65 74 75 72 |alue. */|. retur|
|000023e0| 6e 20 72 65 74 5f 76 61 | 6c 3b 0a 0a 7d 0a 00 00 |n ret_va|l;..}...|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 73 74 6f 72 65 |gdbm-1.7|.3/store|
|00002410| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00002470| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00002480| 20 20 20 33 31 34 31 20 | 20 35 34 37 31 31 32 33 | 3141 | 5471123|
|00002490| 36 33 32 20 20 20 37 30 | 33 32 00 20 00 00 00 00 |632 70|32. ....|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 2f 2a 20 73 74 6f 72 65 | 2e 63 20 2d 20 41 64 64 |/* store|.c - Add|
|00002610| 20 61 20 6e 65 77 20 6b | 65 79 2f 64 61 74 61 20 | a new k|ey/data |
|00002620| 70 61 69 72 20 74 6f 20 | 74 68 65 20 64 61 74 61 |pair to |the data|
|00002630| 62 61 73 65 2e 20 2a 2f | 0a 0a 2f 2a 20 20 54 68 |base. */|../* Th|
|00002640| 69 73 20 66 69 6c 65 20 | 69 73 20 70 61 72 74 20 |is file |is part |
|00002650| 6f 66 20 47 44 42 4d 2c | 20 74 68 65 20 47 4e 55 |of GDBM,| the GNU|
|00002660| 20 64 61 74 61 20 62 61 | 73 65 20 6d 61 6e 61 67 | data ba|se manag|
|00002670| 65 72 2c 20 62 79 20 50 | 68 69 6c 69 70 20 41 2e |er, by P|hilip A.|
|00002680| 20 4e 65 6c 73 6f 6e 2e | 0a 20 20 20 20 43 6f 70 | Nelson.|. Cop|
|00002690| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 39 30 2c |yright (|C) 1990,|
|000026a0| 20 31 39 39 31 2c 20 31 | 39 39 33 20 20 46 72 65 | 1991, 1|993 Fre|
|000026b0| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|000026c0| 61 74 69 6f 6e 2c 20 49 | 6e 63 2e 0a 0a 20 20 20 |ation, I|nc... |
|000026d0| 20 47 44 42 4d 20 69 73 | 20 66 72 65 65 20 73 6f | GDBM is| free so|
|000026e0| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|000026f0| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00002700| 61 6e 64 2f 6f 72 20 6d | 6f 64 69 66 79 0a 20 20 |and/or m|odify. |
|00002710| 20 20 69 74 20 75 6e 64 | 65 72 20 74 68 65 20 74 | it und|er the t|
|00002720| 65 72 6d 73 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |erms of |the GNU |
|00002730| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00002740| 69 63 65 6e 73 65 20 61 | 73 20 70 75 62 6c 69 73 |icense a|s publis|
|00002750| 68 65 64 20 62 79 0a 20 | 20 20 20 74 68 65 20 46 |hed by. | the F|
|00002760| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|00002770| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|00002780| 76 65 72 73 69 6f 6e 20 | 32 2c 20 6f 72 20 28 61 |version |2, or (a|
|00002790| 74 20 79 6f 75 72 20 6f | 70 74 69 6f 6e 29 0a 20 |t your o|ption). |
|000027a0| 20 20 20 61 6e 79 20 6c | 61 74 65 72 20 76 65 72 | any l|ater ver|
|000027b0| 73 69 6f 6e 2e 0a 0a 20 | 20 20 20 47 44 42 4d 20 |sion... | GDBM |
|000027c0| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|000027d0| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|000027e0| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|000027f0| 6c 2c 0a 20 20 20 20 62 | 75 74 20 57 49 54 48 4f |l,. b|ut WITHO|
|00002800| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|00002810| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|00002820| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|00002830| 74 79 20 6f 66 0a 20 20 | 20 20 4d 45 52 43 48 41 |ty of. | MERCHA|
|00002840| 4e 54 41 42 49 4c 49 54 | 59 20 6f 72 20 46 49 54 |NTABILIT|Y or FIT|
|00002850| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|00002860| 43 55 4c 41 52 20 50 55 | 52 50 4f 53 45 2e 20 20 |CULAR PU|RPOSE. |
|00002870| 53 65 65 20 74 68 65 0a | 20 20 20 20 47 4e 55 20 |See the.| GNU |
|00002880| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00002890| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|000028a0| 64 65 74 61 69 6c 73 2e | 0a 0a 20 20 20 20 59 6f |details.|.. Yo|
|000028b0| 75 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 72 65 |u should| have re|
|000028c0| 63 65 69 76 65 64 20 61 | 20 63 6f 70 79 20 6f 66 |ceived a| copy of|
|000028d0| 20 74 68 65 20 47 4e 55 | 20 47 65 6e 65 72 61 6c | the GNU| General|
|000028e0| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 0a | Public |License.|
|000028f0| 20 20 20 20 61 6c 6f 6e | 67 20 77 69 74 68 20 47 | alon|g with G|
|00002900| 44 42 4d 3b 20 73 65 65 | 20 74 68 65 20 66 69 6c |DBM; see| the fil|
|00002910| 65 20 43 4f 50 59 49 4e | 47 2e 20 20 49 66 20 6e |e COPYIN|G. If n|
|00002920| 6f 74 2c 20 77 72 69 74 | 65 20 74 6f 0a 20 20 20 |ot, writ|e to. |
|00002930| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00002940| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 36 |re Found|ation, 6|
|00002950| 37 35 20 4d 61 73 73 20 | 41 76 65 2c 20 43 61 6d |75 Mass |Ave, Cam|
|00002960| 62 72 69 64 67 65 2c 20 | 4d 41 20 30 32 31 33 39 |bridge, |MA 02139|
|00002970| 2c 20 55 53 41 2e 0a 0a | 20 20 20 20 59 6f 75 20 |, USA...| You |
|00002980| 6d 61 79 20 63 6f 6e 74 | 61 63 74 20 74 68 65 20 |may cont|act the |
|00002990| 61 75 74 68 6f 72 20 62 | 79 3a 0a 20 20 20 20 20 |author b|y:. |
|000029a0| 20 20 65 2d 6d 61 69 6c | 3a 20 20 70 68 69 6c 40 | e-mail|: phil@|
|000029b0| 63 73 2e 77 77 75 2e 65 | 64 75 0a 20 20 20 20 20 |cs.wwu.e|du. |
|000029c0| 20 75 73 2d 6d 61 69 6c | 3a 20 20 50 68 69 6c 69 | us-mail|: Phili|
|000029d0| 70 20 41 2e 20 4e 65 6c | 73 6f 6e 0a 20 20 20 20 |p A. Nel|son. |
|000029e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 43 6f 6d 70 | | Comp|
|000029f0| 75 74 65 72 20 53 63 69 | 65 6e 63 65 20 44 65 70 |uter Sci|ence Dep|
|00002a00| 61 72 74 6d 65 6e 74 0a | 20 20 20 20 20 20 20 20 |artment.| |
|00002a10| 20 20 20 20 20 20 20 20 | 57 65 73 74 65 72 6e 20 | |Western |
|00002a20| 57 61 73 68 69 6e 67 74 | 6f 6e 20 55 6e 69 76 65 |Washingt|on Unive|
|00002a30| 72 73 69 74 79 0a 20 20 | 20 20 20 20 20 20 20 20 |rsity. | |
|00002a40| 20 20 20 20 20 20 42 65 | 6c 6c 69 6e 67 68 61 6d | Be|llingham|
|00002a50| 2c 20 57 41 20 39 38 32 | 32 36 0a 20 20 20 20 20 |, WA 982|26. |
|00002a60| 20 20 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .*****|********|
|00002a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 0a 0a |********|****/...|
|00002ab0| 2f 2a 20 69 6e 63 6c 75 | 64 65 20 73 79 73 74 65 |/* inclu|de syste|
|00002ac0| 6d 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |m config|uration |
|00002ad0| 62 65 66 6f 72 65 20 61 | 6c 6c 20 65 6c 73 65 2e |before a|ll else.|
|00002ae0| 20 2a 2f 0a 23 69 6e 63 | 6c 75 64 65 20 22 61 75 | */.#inc|lude "au|
|00002af0| 74 6f 63 6f 6e 66 2e 68 | 22 0a 0a 23 69 6e 63 6c |toconf.h|"..#incl|
|00002b00| 75 64 65 20 22 67 64 62 | 6d 64 65 66 73 2e 68 22 |ude "gdb|mdefs.h"|
|00002b10| 0a 23 69 6e 63 6c 75 64 | 65 20 22 65 78 74 65 72 |.#includ|e "exter|
|00002b20| 6e 2e 68 22 0a 0a 0a 2f | 2a 20 41 64 64 20 61 20 |n.h".../|* Add a |
|00002b30| 6e 65 77 20 65 6c 65 6d | 65 6e 74 20 74 6f 20 74 |new elem|ent to t|
|00002b40| 68 65 20 64 61 74 61 62 | 61 73 65 2e 20 20 43 4f |he datab|ase. CO|
|00002b50| 4e 54 45 4e 54 20 69 73 | 20 6b 65 79 65 64 20 62 |NTENT is| keyed b|
|00002b60| 79 20 4b 45 59 2e 20 20 | 54 68 65 20 66 69 6c 65 |y KEY. |The file|
|00002b70| 20 6f 6e 0a 20 20 20 64 | 69 73 6b 20 69 73 20 75 | on. d|isk is u|
|00002b80| 70 64 61 74 65 64 20 74 | 6f 20 72 65 66 6c 65 63 |pdated t|o reflec|
|00002b90| 74 20 74 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |t the st|ructure |
|00002ba0| 6f 66 20 74 68 65 20 6e | 65 77 20 64 61 74 61 62 |of the n|ew datab|
|00002bb0| 61 73 65 20 62 65 66 6f | 72 65 0a 20 20 20 72 65 |ase befo|re. re|
|00002bc0| 74 75 72 6e 69 6e 67 20 | 66 72 6f 6d 20 74 68 69 |turning |from thi|
|00002bd0| 73 20 70 72 6f 63 65 64 | 75 72 65 2e 20 20 2a 2f |s proced|ure. */|
|00002be0| 0a 0a 69 6e 74 0a 73 74 | 6f 72 65 20 28 6b 65 79 |..int.st|ore (key|
|00002bf0| 2c 20 63 6f 6e 74 65 6e | 74 29 0a 20 20 20 20 20 |, conten|t). |
|00002c00| 64 61 74 75 6d 20 6b 65 | 79 3b 0a 20 20 20 20 20 |datum ke|y;. |
|00002c10| 64 61 74 75 6d 20 63 6f | 6e 74 65 6e 74 3b 0a 7b |datum co|ntent;.{|
|00002c20| 0a 20 20 72 65 74 75 72 | 6e 20 67 64 62 6d 5f 73 |. retur|n gdbm_s|
|00002c30| 74 6f 72 65 20 28 5f 67 | 64 62 6d 5f 66 69 6c 65 |tore (_g|dbm_file|
|00002c40| 2c 20 6b 65 79 2c 20 63 | 6f 6e 74 65 6e 74 2c 20 |, key, c|ontent, |
|00002c50| 47 44 42 4d 5f 52 45 50 | 4c 41 43 45 29 3b 0a 7d |GDBM_REP|LACE);.}|
|00002c60| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e00| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 73 65 71 2e 63 |gdbm-1.7|.3/seq.c|
|00002e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00002e70| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00002e80| 20 20 20 34 34 31 32 20 | 20 35 35 30 37 33 30 36 | 4412 | 5507306|
|00002e90| 30 31 36 20 20 20 36 34 | 36 37 00 20 00 00 00 00 |016 64|67. ....|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 2f 2a 20 73 65 71 2e 63 | 20 2d 20 54 68 69 73 20 |/* seq.c| - This |
|00003010| 69 73 20 74 68 65 20 73 | 65 71 75 65 6e 74 69 61 |is the s|equentia|
|00003020| 6c 20 76 69 73 69 74 20 | 6f 66 20 74 68 65 20 64 |l visit |of the d|
|00003030| 61 74 61 62 61 73 65 2e | 20 20 54 68 69 73 20 64 |atabase.| This d|
|00003040| 65 66 69 6e 65 73 20 74 | 77 6f 0a 20 20 20 75 73 |efines t|wo. us|
|00003050| 65 72 2d 76 69 73 61 62 | 6c 65 20 72 6f 75 74 69 |er-visab|le routi|
|00003060| 6e 65 73 20 74 68 61 74 | 20 61 72 65 20 75 73 65 |nes that| are use|
|00003070| 64 20 74 6f 67 65 74 68 | 65 72 2e 20 54 68 69 73 |d togeth|er. This|
|00003080| 20 69 73 20 74 68 65 20 | 44 42 4d 20 69 6e 74 65 | is the |DBM inte|
|00003090| 72 66 61 63 65 2e 20 2a | 2f 0a 0a 2f 2a 20 20 54 |rface. *|/../* T|
|000030a0| 68 69 73 20 66 69 6c 65 | 20 69 73 20 70 61 72 74 |his file| is part|
|000030b0| 20 6f 66 20 47 44 42 4d | 2c 20 74 68 65 20 47 4e | of GDBM|, the GN|
|000030c0| 55 20 64 61 74 61 20 62 | 61 73 65 20 6d 61 6e 61 |U data b|ase mana|
|000030d0| 67 65 72 2c 20 62 79 20 | 50 68 69 6c 69 70 20 41 |ger, by |Philip A|
|000030e0| 2e 20 4e 65 6c 73 6f 6e | 2e 0a 20 20 20 20 43 6f |. Nelson|.. Co|
|000030f0| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 39 30 |pyright |(C) 1990|
|00003100| 2c 20 31 39 39 31 2c 20 | 31 39 39 33 20 20 46 72 |, 1991, |1993 Fr|
|00003110| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00003120| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 0a 20 20 |dation, |Inc... |
|00003130| 20 20 47 44 42 4d 20 69 | 73 20 66 72 65 65 20 73 | GDBM i|s free s|
|00003140| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|00003150| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 20 69 74 | redistr|ibute it|
|00003160| 20 61 6e 64 2f 6f 72 20 | 6d 6f 64 69 66 79 0a 20 | and/or |modify. |
|00003170| 20 20 20 69 74 20 75 6e | 64 65 72 20 74 68 65 20 | it un|der the |
|00003180| 74 65 72 6d 73 20 6f 66 | 20 74 68 65 20 47 4e 55 |terms of| the GNU|
|00003190| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|000031a0| 4c 69 63 65 6e 73 65 20 | 61 73 20 70 75 62 6c 69 |License |as publi|
|000031b0| 73 68 65 64 20 62 79 0a | 20 20 20 20 74 68 65 20 |shed by.| the |
|000031c0| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|000031d0| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|000031e0| 20 76 65 72 73 69 6f 6e | 20 32 2c 20 6f 72 20 28 | version| 2, or (|
|000031f0| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 0a |at your |option).|
|00003200| 20 20 20 20 61 6e 79 20 | 6c 61 74 65 72 20 76 65 | any |later ve|
|00003210| 72 73 69 6f 6e 2e 0a 0a | 20 20 20 20 47 44 42 4d |rsion...| GDBM|
|00003220| 20 69 73 20 64 69 73 74 | 72 69 62 75 74 65 64 20 | is dist|ributed |
|00003230| 69 6e 20 74 68 65 20 68 | 6f 70 65 20 74 68 61 74 |in the h|ope that|
|00003240| 20 69 74 20 77 69 6c 6c | 20 62 65 20 75 73 65 66 | it will| be usef|
|00003250| 75 6c 2c 0a 20 20 20 20 | 62 75 74 20 57 49 54 48 |ul,. |but WITH|
|00003260| 4f 55 54 20 41 4e 59 20 | 57 41 52 52 41 4e 54 59 |OUT ANY |WARRANTY|
|00003270| 3b 20 77 69 74 68 6f 75 | 74 20 65 76 65 6e 20 74 |; withou|t even t|
|00003280| 68 65 20 69 6d 70 6c 69 | 65 64 20 77 61 72 72 61 |he impli|ed warra|
|00003290| 6e 74 79 20 6f 66 0a 20 | 20 20 20 4d 45 52 43 48 |nty of. | MERCH|
|000032a0| 41 4e 54 41 42 49 4c 49 | 54 59 20 6f 72 20 46 49 |ANTABILI|TY or FI|
|000032b0| 54 4e 45 53 53 20 46 4f | 52 20 41 20 50 41 52 54 |TNESS FO|R A PART|
|000032c0| 49 43 55 4c 41 52 20 50 | 55 52 50 4f 53 45 2e 20 |ICULAR P|URPOSE. |
|000032d0| 20 53 65 65 20 74 68 65 | 0a 20 20 20 20 47 4e 55 | See the|. GNU|
|000032e0| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|000032f0| 4c 69 63 65 6e 73 65 20 | 66 6f 72 20 6d 6f 72 65 |License |for more|
|00003300| 20 64 65 74 61 69 6c 73 | 2e 0a 0a 20 20 20 20 59 | details|... Y|
|00003310| 6f 75 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 72 |ou shoul|d have r|
|00003320| 65 63 65 69 76 65 64 20 | 61 20 63 6f 70 79 20 6f |eceived |a copy o|
|00003330| 66 20 74 68 65 20 47 4e | 55 20 47 65 6e 65 72 61 |f the GN|U Genera|
|00003340| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|00003350| 0a 20 20 20 20 61 6c 6f | 6e 67 20 77 69 74 68 20 |. alo|ng with |
|00003360| 47 44 42 4d 3b 20 73 65 | 65 20 74 68 65 20 66 69 |GDBM; se|e the fi|
|00003370| 6c 65 20 43 4f 50 59 49 | 4e 47 2e 20 20 49 66 20 |le COPYI|NG. If |
|00003380| 6e 6f 74 2c 20 77 72 69 | 74 65 20 74 6f 0a 20 20 |not, wri|te to. |
|00003390| 20 20 74 68 65 20 46 72 | 65 65 20 53 6f 66 74 77 | the Fr|ee Softw|
|000033a0| 61 72 65 20 46 6f 75 6e | 64 61 74 69 6f 6e 2c 20 |are Foun|dation, |
|000033b0| 36 37 35 20 4d 61 73 73 | 20 41 76 65 2c 20 43 61 |675 Mass| Ave, Ca|
|000033c0| 6d 62 72 69 64 67 65 2c | 20 4d 41 20 30 32 31 33 |mbridge,| MA 0213|
|000033d0| 39 2c 20 55 53 41 2e 0a | 0a 20 20 20 20 59 6f 75 |9, USA..|. You|
|000033e0| 20 6d 61 79 20 63 6f 6e | 74 61 63 74 20 74 68 65 | may con|tact the|
|000033f0| 20 61 75 74 68 6f 72 20 | 62 79 3a 0a 20 20 20 20 | author |by:. |
|00003400| 20 20 20 65 2d 6d 61 69 | 6c 3a 20 20 70 68 69 6c | e-mai|l: phil|
|00003410| 40 63 73 2e 77 77 75 2e | 65 64 75 0a 20 20 20 20 |@cs.wwu.|edu. |
|00003420| 20 20 75 73 2d 6d 61 69 | 6c 3a 20 20 50 68 69 6c | us-mai|l: Phil|
|00003430| 69 70 20 41 2e 20 4e 65 | 6c 73 6f 6e 0a 20 20 20 |ip A. Ne|lson. |
|00003440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 6f 6d | | Com|
|00003450| 70 75 74 65 72 20 53 63 | 69 65 6e 63 65 20 44 65 |puter Sc|ience De|
|00003460| 70 61 72 74 6d 65 6e 74 | 0a 20 20 20 20 20 20 20 |partment|. |
|00003470| 20 20 20 20 20 20 20 20 | 20 57 65 73 74 65 72 6e | | Western|
|00003480| 20 57 61 73 68 69 6e 67 | 74 6f 6e 20 55 6e 69 76 | Washing|ton Univ|
|00003490| 65 72 73 69 74 79 0a 20 | 20 20 20 20 20 20 20 20 |ersity. | |
|000034a0| 20 20 20 20 20 20 20 42 | 65 6c 6c 69 6e 67 68 61 | B|ellingha|
|000034b0| 6d 2c 20 57 41 20 39 38 | 32 32 36 0a 20 20 20 20 |m, WA 98|226. |
|000034c0| 20 20 20 0a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .****|********|
|000034d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000034e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000034f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 0a |********|*****/..|
|00003510| 0a 2f 2a 20 69 6e 63 6c | 75 64 65 20 73 79 73 74 |./* incl|ude syst|
|00003520| 65 6d 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |em confi|guration|
|00003530| 20 62 65 66 6f 72 65 20 | 61 6c 6c 20 65 6c 73 65 | before |all else|
|00003540| 2e 20 2a 2f 0a 23 69 6e | 63 6c 75 64 65 20 22 61 |. */.#in|clude "a|
|00003550| 75 74 6f 63 6f 6e 66 2e | 68 22 0a 0a 23 69 6e 63 |utoconf.|h"..#inc|
|00003560| 6c 75 64 65 20 22 67 64 | 62 6d 64 65 66 73 2e 68 |lude "gd|bmdefs.h|
|00003570| 22 0a 23 69 6e 63 6c 75 | 64 65 20 22 65 78 74 65 |".#inclu|de "exte|
|00003580| 72 6e 2e 68 22 0a 0a 2f | 2a 20 53 74 61 72 74 20 |rn.h"../|* Start |
|00003590| 74 68 65 20 76 69 73 69 | 74 20 6f 66 20 61 6c 6c |the visi|t of all|
|000035a0| 20 6b 65 79 73 20 69 6e | 20 74 68 65 20 64 61 74 | keys in| the dat|
|000035b0| 61 62 61 73 65 2e 20 20 | 54 68 69 73 20 70 72 6f |abase. |This pro|
|000035c0| 64 75 63 65 73 20 73 6f | 6d 65 74 68 69 6e 67 20 |duces so|mething |
|000035d0| 69 6e 0a 20 20 20 68 61 | 73 68 20 6f 72 64 65 72 |in. ha|sh order|
|000035e0| 2c 20 6e 6f 74 20 69 6e | 20 61 6e 79 20 73 6f 72 |, not in| any sor|
|000035f0| 74 65 64 20 6f 72 64 65 | 72 2e 20 20 2a 2f 0a 0a |ted orde|r. */..|
|00003600| 64 61 74 75 6d 0a 66 69 | 72 73 74 6b 65 79 20 28 |datum.fi|rstkey (|
|00003610| 29 0a 7b 0a 20 20 64 61 | 74 75 6d 20 72 65 74 5f |).{. da|tum ret_|
|00003620| 76 61 6c 3b 0a 0a 20 20 | 2f 2a 20 46 72 65 65 20 |val;.. |/* Free |
|00003630| 70 72 65 76 69 6f 75 73 | 20 64 79 6e 61 6d 69 63 |previous| dynamic|
|00003640| 20 6d 65 6d 6f 72 79 2c | 20 64 6f 20 61 63 74 75 | memory,| do actu|
|00003650| 61 6c 20 63 61 6c 6c 2c | 20 61 6e 64 20 73 61 76 |al call,| and sav|
|00003660| 65 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 6e 65 77 |e pointe|r to new|
|00003670| 0a 20 20 20 20 20 6d 65 | 6d 6f 72 79 2e 20 2a 2f |. me|mory. */|
|00003680| 0a 20 20 72 65 74 5f 76 | 61 6c 20 3d 20 67 64 62 |. ret_v|al = gdb|
|00003690| 6d 5f 66 69 72 73 74 6b | 65 79 20 28 5f 67 64 62 |m_firstk|ey (_gdb|
|000036a0| 6d 5f 66 69 6c 65 29 3b | 0a 20 20 69 66 20 28 5f |m_file);|. if (_|
|000036b0| 67 64 62 6d 5f 6d 65 6d | 6f 72 79 2e 64 70 74 72 |gdbm_mem|ory.dptr|
|000036c0| 20 21 3d 20 4e 55 4c 4c | 29 20 66 72 65 65 20 28 | != NULL|) free (|
|000036d0| 5f 67 64 62 6d 5f 6d 65 | 6d 6f 72 79 2e 64 70 74 |_gdbm_me|mory.dpt|
|000036e0| 72 29 3b 0a 20 20 5f 67 | 64 62 6d 5f 6d 65 6d 6f |r);. _g|dbm_memo|
|000036f0| 72 79 20 3d 20 72 65 74 | 5f 76 61 6c 3b 0a 0a 20 |ry = ret|_val;.. |
|00003700| 20 2f 2a 20 52 65 74 75 | 72 6e 20 74 68 65 20 6e | /* Retu|rn the n|
|00003710| 65 77 20 76 61 6c 75 65 | 2e 20 2a 2f 0a 20 20 72 |ew value|. */. r|
|00003720| 65 74 75 72 6e 20 72 65 | 74 5f 76 61 6c 3b 0a 7d |eturn re|t_val;.}|
|00003730| 0a 0a 0a 2f 2a 20 43 6f | 6e 74 69 6e 75 65 20 76 |.../* Co|ntinue v|
|00003740| 69 73 69 74 69 6e 67 20 | 61 6c 6c 20 6b 65 79 73 |isiting |all keys|
|00003750| 2e 20 20 54 68 65 20 6e | 65 78 74 20 6b 65 79 20 |. The n|ext key |
|00003760| 66 6f 6c 6c 6f 77 69 6e | 67 20 4b 45 59 20 69 73 |followin|g KEY is|
|00003770| 20 72 65 74 75 72 6e 65 | 64 2e 20 2a 2f 0a 0a 64 | returne|d. */..d|
|00003780| 61 74 75 6d 0a 6e 65 78 | 74 6b 65 79 20 28 6b 65 |atum.nex|tkey (ke|
|00003790| 79 29 0a 20 20 20 20 20 | 64 61 74 75 6d 20 6b 65 |y). |datum ke|
|000037a0| 79 3b 0a 7b 0a 20 20 64 | 61 74 75 6d 20 72 65 74 |y;.{. d|atum ret|
|000037b0| 5f 76 61 6c 3b 0a 0a 20 | 20 2f 2a 20 4d 61 6b 65 |_val;.. | /* Make|
|000037c0| 20 73 75 72 65 20 77 65 | 20 68 61 76 65 20 61 20 | sure we| have a |
|000037d0| 76 61 6c 69 64 20 6b 65 | 79 2e 20 2a 2f 0a 20 20 |valid ke|y. */. |
|000037e0| 69 66 20 28 6b 65 79 2e | 64 70 74 72 20 3d 3d 20 |if (key.|dptr == |
|000037f0| 4e 55 4c 4c 29 0a 20 20 | 20 20 72 65 74 75 72 6e |NULL). | return|
|00003800| 20 6b 65 79 3b 0a 0a 20 | 20 2f 2a 20 43 61 6c 6c | key;.. | /* Call|
|00003810| 20 67 64 62 6d 20 6e 65 | 78 74 6b 65 79 20 77 69 | gdbm ne|xtkey wi|
|00003820| 74 68 20 73 75 70 70 6c | 69 65 64 20 76 61 6c 75 |th suppl|ied valu|
|00003830| 65 2e 20 41 66 74 65 72 | 20 74 68 61 74 2c 20 66 |e. After| that, f|
|00003840| 72 65 65 20 74 68 65 20 | 6f 6c 64 20 76 61 6c 75 |ree the |old valu|
|00003850| 65 2e 20 2a 2f 0a 20 20 | 72 65 74 5f 76 61 6c 20 |e. */. |ret_val |
|00003860| 3d 20 67 64 62 6d 5f 6e | 65 78 74 6b 65 79 20 28 |= gdbm_n|extkey (|
|00003870| 5f 67 64 62 6d 5f 66 69 | 6c 65 2c 20 6b 65 79 29 |_gdbm_fi|le, key)|
|00003880| 3b 0a 20 20 69 66 20 28 | 5f 67 64 62 6d 5f 6d 65 |;. if (|_gdbm_me|
|00003890| 6d 6f 72 79 2e 64 70 74 | 72 20 21 3d 20 4e 55 4c |mory.dpt|r != NUL|
|000038a0| 4c 29 20 66 72 65 65 20 | 28 5f 67 64 62 6d 5f 6d |L) free |(_gdbm_m|
|000038b0| 65 6d 6f 72 79 2e 64 70 | 74 72 29 3b 0a 20 20 5f |emory.dp|tr);. _|
|000038c0| 67 64 62 6d 5f 6d 65 6d | 6f 72 79 20 3d 20 72 65 |gdbm_mem|ory = re|
|000038d0| 74 5f 76 61 6c 3b 0a 0a | 20 20 2f 2a 20 52 65 74 |t_val;..| /* Ret|
|000038e0| 75 72 6e 20 74 68 65 20 | 6e 65 77 20 76 61 6c 75 |urn the |new valu|
|000038f0| 65 2e 20 2a 2f 0a 20 20 | 72 65 74 75 72 6e 20 72 |e. */. |return r|
|00003900| 65 74 5f 76 61 6c 3b 0a | 7d 0a 00 00 00 00 00 00 |et_val;.|}.......|
|00003910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 63 6c 6f 73 65 |gdbm-1.7|.3/close|
|00003a10| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00003a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a60| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00003a70| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00003a80| 20 20 20 33 33 31 35 20 | 20 35 35 30 37 33 30 30 | 3315 | 5507300|
|00003a90| 32 34 31 20 20 20 36 37 | 37 37 00 20 00 00 00 00 |241 67|77. ....|
|00003aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c00| 2f 2a 20 63 6c 6f 73 65 | 2e 63 20 2d 20 43 6c 6f |/* close|.c - Clo|
|00003c10| 73 65 20 74 68 65 20 22 | 6f 72 69 67 69 6e 61 6c |se the "|original|
|00003c20| 22 20 73 74 79 6c 65 20 | 64 61 74 61 62 61 73 65 |" style |database|
|00003c30| 2e 20 2a 2f 0a 0a 2f 2a | 20 20 54 68 69 73 20 66 |. */../*| This f|
|00003c40| 69 6c 65 20 69 73 20 70 | 61 72 74 20 6f 66 20 47 |ile is p|art of G|
|00003c50| 44 42 4d 2c 20 74 68 65 | 20 47 4e 55 20 64 61 74 |DBM, the| GNU dat|
|00003c60| 61 20 62 61 73 65 20 6d | 61 6e 61 67 65 72 2c 20 |a base m|anager, |
|00003c70| 62 79 20 50 68 69 6c 69 | 70 20 41 2e 20 4e 65 6c |by Phili|p A. Nel|
|00003c80| 73 6f 6e 2e 0a 20 20 20 | 20 43 6f 70 79 72 69 67 |son.. | Copyrig|
|00003c90| 68 74 20 28 43 29 20 31 | 39 39 33 20 20 46 72 65 |ht (C) 1|993 Fre|
|00003ca0| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|00003cb0| 61 74 69 6f 6e 2c 20 49 | 6e 63 2e 0a 0a 20 20 20 |ation, I|nc... |
|00003cc0| 20 47 44 42 4d 20 69 73 | 20 66 72 65 65 20 73 6f | GDBM is| free so|
|00003cd0| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|00003ce0| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00003cf0| 61 6e 64 2f 6f 72 20 6d | 6f 64 69 66 79 0a 20 20 |and/or m|odify. |
|00003d00| 20 20 69 74 20 75 6e 64 | 65 72 20 74 68 65 20 74 | it und|er the t|
|00003d10| 65 72 6d 73 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |erms of |the GNU |
|00003d20| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00003d30| 69 63 65 6e 73 65 20 61 | 73 20 70 75 62 6c 69 73 |icense a|s publis|
|00003d40| 68 65 64 20 62 79 0a 20 | 20 20 20 74 68 65 20 46 |hed by. | the F|
|00003d50| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|00003d60| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|00003d70| 76 65 72 73 69 6f 6e 20 | 32 2c 20 6f 72 20 28 61 |version |2, or (a|
|00003d80| 74 20 79 6f 75 72 20 6f | 70 74 69 6f 6e 29 0a 20 |t your o|ption). |
|00003d90| 20 20 20 61 6e 79 20 6c | 61 74 65 72 20 76 65 72 | any l|ater ver|
|00003da0| 73 69 6f 6e 2e 0a 0a 20 | 20 20 20 47 44 42 4d 20 |sion... | GDBM |
|00003db0| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|00003dc0| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|00003dd0| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|00003de0| 6c 2c 0a 20 20 20 20 62 | 75 74 20 57 49 54 48 4f |l,. b|ut WITHO|
|00003df0| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|00003e00| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|00003e10| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|00003e20| 74 79 20 6f 66 0a 20 20 | 20 20 4d 45 52 43 48 41 |ty of. | MERCHA|
|00003e30| 4e 54 41 42 49 4c 49 54 | 59 20 6f 72 20 46 49 54 |NTABILIT|Y or FIT|
|00003e40| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|00003e50| 43 55 4c 41 52 20 50 55 | 52 50 4f 53 45 2e 20 20 |CULAR PU|RPOSE. |
|00003e60| 53 65 65 20 74 68 65 0a | 20 20 20 20 47 4e 55 20 |See the.| GNU |
|00003e70| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00003e80| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|00003e90| 64 65 74 61 69 6c 73 2e | 0a 0a 20 20 20 20 59 6f |details.|.. Yo|
|00003ea0| 75 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 72 65 |u should| have re|
|00003eb0| 63 65 69 76 65 64 20 61 | 20 63 6f 70 79 20 6f 66 |ceived a| copy of|
|00003ec0| 20 74 68 65 20 47 4e 55 | 20 47 65 6e 65 72 61 6c | the GNU| General|
|00003ed0| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 0a | Public |License.|
|00003ee0| 20 20 20 20 61 6c 6f 6e | 67 20 77 69 74 68 20 47 | alon|g with G|
|00003ef0| 44 42 4d 3b 20 73 65 65 | 20 74 68 65 20 66 69 6c |DBM; see| the fil|
|00003f00| 65 20 43 4f 50 59 49 4e | 47 2e 20 20 49 66 20 6e |e COPYIN|G. If n|
|00003f10| 6f 74 2c 20 77 72 69 74 | 65 20 74 6f 0a 20 20 20 |ot, writ|e to. |
|00003f20| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00003f30| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 36 |re Found|ation, 6|
|00003f40| 37 35 20 4d 61 73 73 20 | 41 76 65 2c 20 43 61 6d |75 Mass |Ave, Cam|
|00003f50| 62 72 69 64 67 65 2c 20 | 4d 41 20 30 32 31 33 39 |bridge, |MA 02139|
|00003f60| 2c 20 55 53 41 2e 0a 0a | 20 20 20 20 59 6f 75 20 |, USA...| You |
|00003f70| 6d 61 79 20 63 6f 6e 74 | 61 63 74 20 74 68 65 20 |may cont|act the |
|00003f80| 6f 72 69 67 69 6e 61 6c | 20 61 75 74 68 6f 72 20 |original| author |
|00003f90| 62 79 3a 0a 20 20 20 20 | 20 20 20 65 2d 6d 61 69 |by:. | e-mai|
|00003fa0| 6c 3a 20 20 70 68 69 6c | 40 63 73 2e 77 77 75 2e |l: phil|@cs.wwu.|
|00003fb0| 65 64 75 0a 20 20 20 20 | 20 20 75 73 2d 6d 61 69 |edu. | us-mai|
|00003fc0| 6c 3a 20 20 50 68 69 6c | 69 70 20 41 2e 20 4e 65 |l: Phil|ip A. Ne|
|00003fd0| 6c 73 6f 6e 0a 20 20 20 | 20 20 20 20 20 20 20 20 |lson. | |
|00003fe0| 20 20 20 20 20 43 6f 6d | 70 75 74 65 72 20 53 63 | Com|puter Sc|
|00003ff0| 69 65 6e 63 65 20 44 65 | 70 61 72 74 6d 65 6e 74 |ience De|partment|
|00004000| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004010| 20 57 65 73 74 65 72 6e | 20 57 61 73 68 69 6e 67 | Western| Washing|
|00004020| 74 6f 6e 20 55 6e 69 76 | 65 72 73 69 74 79 0a 20 |ton Univ|ersity. |
|00004030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 42 | | B|
|00004040| 65 6c 6c 69 6e 67 68 61 | 6d 2c 20 57 41 20 39 38 |ellingha|m, WA 98|
|00004050| 32 32 36 0a 20 20 20 20 | 20 20 20 0a 20 20 20 20 |226. | . |
|00004060| 54 68 65 20 61 75 74 68 | 6f 72 20 6f 66 20 74 68 |The auth|or of th|
|00004070| 69 73 20 66 69 6c 65 20 | 69 73 3a 0a 20 20 20 20 |is file |is:. |
|00004080| 20 20 20 65 2d 6d 61 69 | 6c 3a 20 20 64 6f 77 6e | e-mai|l: down|
|00004090| 73 6a 40 63 73 6f 73 2e | 6f 72 73 74 2e 65 64 75 |sj@csos.|orst.edu|
|000040a0| 0a 0a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..******|********|
|000040b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000040c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000040d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000040e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 0a 0a 2f |********|***/.../|
|000040f0| 2a 20 69 6e 63 6c 75 64 | 65 20 73 79 73 74 65 6d |* includ|e system|
|00004100| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00004110| 65 66 6f 72 65 20 61 6c | 6c 20 65 6c 73 65 2e 20 |efore al|l else. |
|00004120| 2a 2f 0a 23 69 6e 63 6c | 75 64 65 20 22 61 75 74 |*/.#incl|ude "aut|
|00004130| 6f 63 6f 6e 66 2e 68 22 | 0a 0a 23 69 6e 63 6c 75 |oconf.h"|..#inclu|
|00004140| 64 65 20 22 67 64 62 6d | 64 65 66 73 2e 68 22 0a |de "gdbm|defs.h".|
|00004150| 23 69 6e 63 6c 75 64 65 | 20 22 65 78 74 65 72 6e |#include| "extern|
|00004160| 2e 68 22 0a 0a 0a 2f 2a | 20 69 74 27 73 20 75 6e |.h".../*| it's un|
|00004170| 63 6c 65 61 72 20 77 68 | 65 74 68 65 72 20 64 62 |clear wh|ether db|
|00004180| 6d 63 6c 6f 73 65 28 29 | 20 69 73 20 2a 61 6c 77 |mclose()| is *alw|
|00004190| 61 79 73 2a 20 61 20 76 | 6f 69 64 20 66 75 6e 63 |ays* a v|oid func|
|000041a0| 74 69 6f 6e 20 69 6e 20 | 6f 6c 64 0a 20 20 20 43 |tion in |old. C|
|000041b0| 20 6c 69 62 72 61 72 69 | 65 73 2e 20 77 65 20 75 | librari|es. we u|
|000041c0| 73 65 20 69 6e 74 2c 20 | 68 65 72 65 2e 20 2a 2f |se int, |here. */|
|000041d0| 0a 0a 69 6e 74 0a 64 62 | 6d 63 6c 6f 73 65 28 29 |..int.db|mclose()|
|000041e0| 0a 7b 0a 20 20 69 66 20 | 28 5f 67 64 62 6d 5f 66 |.{. if |(_gdbm_f|
|000041f0| 69 6c 65 20 21 3d 20 4e | 55 4c 4c 29 0a 20 20 20 |ile != N|ULL). |
|00004200| 20 7b 0a 20 20 20 20 20 | 20 67 64 62 6d 5f 63 6c | {. | gdbm_cl|
|00004210| 6f 73 65 20 28 5f 67 64 | 62 6d 5f 66 69 6c 65 29 |ose (_gd|bm_file)|
|00004220| 3b 0a 20 20 20 20 20 20 | 5f 67 64 62 6d 5f 66 69 |;. |_gdbm_fi|
|00004230| 6c 65 20 3d 20 4e 55 4c | 4c 3b 0a 20 20 20 20 20 |le = NUL|L;. |
|00004240| 20 69 66 20 28 5f 67 64 | 62 6d 5f 6d 65 6d 6f 72 | if (_gd|bm_memor|
|00004250| 79 2e 64 70 74 72 20 21 | 3d 20 4e 55 4c 4c 29 20 |y.dptr !|= NULL) |
|00004260| 66 72 65 65 28 5f 67 64 | 62 6d 5f 6d 65 6d 6f 72 |free(_gd|bm_memor|
|00004270| 79 2e 64 70 74 72 29 3b | 0a 20 20 20 20 20 20 5f |y.dptr);|. _|
|00004280| 67 64 62 6d 5f 6d 65 6d | 6f 72 79 2e 64 70 74 72 |gdbm_mem|ory.dptr|
|00004290| 20 3d 20 4e 55 4c 4c 3b | 0a 20 20 20 20 20 20 5f | = NULL;|. _|
|000042a0| 67 64 62 6d 5f 6d 65 6d | 6f 72 79 2e 64 73 69 7a |gdbm_mem|ory.dsiz|
|000042b0| 65 20 3d 20 30 3b 0a 20 | 20 20 20 7d 0a 20 20 72 |e = 0;. | }. r|
|000042c0| 65 74 75 72 6e 20 28 30 | 29 3b 0a 7d 0a 00 00 00 |eturn (0|);.}....|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004400| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 64 62 6d 6f 70 |gdbm-1.7|.3/dbmop|
|00004410| 65 6e 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |en.c....|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00004470| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00004480| 20 20 31 30 37 33 31 20 | 20 35 34 37 31 31 32 35 | 10731 | 5471125|
|00004490| 36 30 30 20 20 20 37 33 | 34 32 00 20 00 00 00 00 |600 73|42. ....|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 2f 2a 20 64 62 6d 6f 70 | 65 6e 2e 63 20 2d 20 4f |/* dbmop|en.c - O|
|00004610| 70 65 6e 20 74 68 65 20 | 66 69 6c 65 20 66 6f 72 |pen the |file for|
|00004620| 20 64 62 6d 20 6f 70 65 | 72 61 74 69 6f 6e 73 2e | dbm ope|rations.|
|00004630| 20 54 68 69 73 20 6c 6f | 6f 6b 73 20 6c 69 6b 65 | This lo|oks like|
|00004640| 20 74 68 65 0a 20 20 20 | 4e 44 42 4d 20 69 6e 74 | the. |NDBM int|
|00004650| 65 72 66 61 63 65 20 66 | 6f 72 20 64 62 6d 20 75 |erface f|or dbm u|
|00004660| 73 65 2e 20 2a 2f 0a 0a | 2f 2a 20 20 54 68 69 73 |se. */..|/* This|
|00004670| 20 66 69 6c 65 20 69 73 | 20 70 61 72 74 20 6f 66 | file is| part of|
|00004680| 20 47 44 42 4d 2c 20 74 | 68 65 20 47 4e 55 20 64 | GDBM, t|he GNU d|
|00004690| 61 74 61 20 62 61 73 65 | 20 6d 61 6e 61 67 65 72 |ata base| manager|
|000046a0| 2c 20 62 79 20 50 68 69 | 6c 69 70 20 41 2e 20 4e |, by Phi|lip A. N|
|000046b0| 65 6c 73 6f 6e 2e 0a 20 | 20 20 20 43 6f 70 79 72 |elson.. | Copyr|
|000046c0| 69 67 68 74 20 28 43 29 | 20 31 39 39 30 2c 20 31 |ight (C)| 1990, 1|
|000046d0| 39 39 31 2c 20 31 39 39 | 33 20 20 46 72 65 65 20 |991, 199|3 Free |
|000046e0| 53 6f 66 74 77 61 72 65 | 20 46 6f 75 6e 64 61 74 |Software| Foundat|
|000046f0| 69 6f 6e 2c 20 49 6e 63 | 2e 0a 0a 20 20 20 20 47 |ion, Inc|... G|
|00004700| 44 42 4d 20 69 73 20 66 | 72 65 65 20 73 6f 66 74 |DBM is f|ree soft|
|00004710| 77 61 72 65 3b 20 79 6f | 75 20 63 61 6e 20 72 65 |ware; yo|u can re|
|00004720| 64 69 73 74 72 69 62 75 | 74 65 20 69 74 20 61 6e |distribu|te it an|
|00004730| 64 2f 6f 72 20 6d 6f 64 | 69 66 79 0a 20 20 20 20 |d/or mod|ify. |
|00004740| 69 74 20 75 6e 64 65 72 | 20 74 68 65 20 74 65 72 |it under| the ter|
|00004750| 6d 73 20 6f 66 20 74 68 | 65 20 47 4e 55 20 47 65 |ms of th|e GNU Ge|
|00004760| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00004770| 65 6e 73 65 20 61 73 20 | 70 75 62 6c 69 73 68 65 |ense as |publishe|
|00004780| 64 20 62 79 0a 20 20 20 | 20 74 68 65 20 46 72 65 |d by. | the Fre|
|00004790| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|000047a0| 61 74 69 6f 6e 3b 20 65 | 69 74 68 65 72 20 76 65 |ation; e|ither ve|
|000047b0| 72 73 69 6f 6e 20 32 2c | 20 6f 72 20 28 61 74 20 |rsion 2,| or (at |
|000047c0| 79 6f 75 72 20 6f 70 74 | 69 6f 6e 29 0a 20 20 20 |your opt|ion). |
|000047d0| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|000047e0| 6f 6e 2e 0a 0a 20 20 20 | 20 47 44 42 4d 20 69 73 |on... | GDBM is|
|000047f0| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 69 6e 20 | distrib|uted in |
|00004800| 74 68 65 20 68 6f 70 65 | 20 74 68 61 74 20 69 74 |the hope| that it|
|00004810| 20 77 69 6c 6c 20 62 65 | 20 75 73 65 66 75 6c 2c | will be| useful,|
|00004820| 0a 20 20 20 20 62 75 74 | 20 57 49 54 48 4f 55 54 |. but| WITHOUT|
|00004830| 20 41 4e 59 20 57 41 52 | 52 41 4e 54 59 3b 20 77 | ANY WAR|RANTY; w|
|00004840| 69 74 68 6f 75 74 20 65 | 76 65 6e 20 74 68 65 20 |ithout e|ven the |
|00004850| 69 6d 70 6c 69 65 64 20 | 77 61 72 72 61 6e 74 79 |implied |warranty|
|00004860| 20 6f 66 0a 20 20 20 20 | 4d 45 52 43 48 41 4e 54 | of. |MERCHANT|
|00004870| 41 42 49 4c 49 54 59 20 | 6f 72 20 46 49 54 4e 45 |ABILITY |or FITNE|
|00004880| 53 53 20 46 4f 52 20 41 | 20 50 41 52 54 49 43 55 |SS FOR A| PARTICU|
|00004890| 4c 41 52 20 50 55 52 50 | 4f 53 45 2e 20 20 53 65 |LAR PURP|OSE. Se|
|000048a0| 65 20 74 68 65 0a 20 20 | 20 20 47 4e 55 20 47 65 |e the. | GNU Ge|
|000048b0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|000048c0| 65 6e 73 65 20 66 6f 72 | 20 6d 6f 72 65 20 64 65 |ense for| more de|
|000048d0| 74 61 69 6c 73 2e 0a 0a | 20 20 20 20 59 6f 75 20 |tails...| You |
|000048e0| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 72 65 63 65 |should h|ave rece|
|000048f0| 69 76 65 64 20 61 20 63 | 6f 70 79 20 6f 66 20 74 |ived a c|opy of t|
|00004900| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00004910| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 0a 20 20 |ublic Li|cense. |
|00004920| 20 20 61 6c 6f 6e 67 20 | 77 69 74 68 20 47 44 42 | along |with GDB|
|00004930| 4d 3b 20 73 65 65 20 74 | 68 65 20 66 69 6c 65 20 |M; see t|he file |
|00004940| 43 4f 50 59 49 4e 47 2e | 20 20 49 66 20 6e 6f 74 |COPYING.| If not|
|00004950| 2c 20 77 72 69 74 65 20 | 74 6f 0a 20 20 20 20 74 |, write |to. t|
|00004960| 68 65 20 46 72 65 65 20 | 53 6f 66 74 77 61 72 65 |he Free |Software|
|00004970| 20 46 6f 75 6e 64 61 74 | 69 6f 6e 2c 20 36 37 35 | Foundat|ion, 675|
|00004980| 20 4d 61 73 73 20 41 76 | 65 2c 20 43 61 6d 62 72 | Mass Av|e, Cambr|
|00004990| 69 64 67 65 2c 20 4d 41 | 20 30 32 31 33 39 2c 20 |idge, MA| 02139, |
|000049a0| 55 53 41 2e 0a 0a 20 20 | 20 20 59 6f 75 20 6d 61 |USA... | You ma|
|000049b0| 79 20 63 6f 6e 74 61 63 | 74 20 74 68 65 20 61 75 |y contac|t the au|
|000049c0| 74 68 6f 72 20 62 79 3a | 0a 20 20 20 20 20 20 20 |thor by:|. |
|000049d0| 65 2d 6d 61 69 6c 3a 20 | 20 70 68 69 6c 40 63 73 |e-mail: | phil@cs|
|000049e0| 2e 77 77 75 2e 65 64 75 | 0a 20 20 20 20 20 20 75 |.wwu.edu|. u|
|000049f0| 73 2d 6d 61 69 6c 3a 20 | 20 50 68 69 6c 69 70 20 |s-mail: | Philip |
|00004a00| 41 2e 20 4e 65 6c 73 6f | 6e 0a 20 20 20 20 20 20 |A. Nelso|n. |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 43 6f 6d 70 75 74 | | Comput|
|00004a20| 65 72 20 53 63 69 65 6e | 63 65 20 44 65 70 61 72 |er Scien|ce Depar|
|00004a30| 74 6d 65 6e 74 0a 20 20 | 20 20 20 20 20 20 20 20 |tment. | |
|00004a40| 20 20 20 20 20 20 57 65 | 73 74 65 72 6e 20 57 61 | We|stern Wa|
|00004a50| 73 68 69 6e 67 74 6f 6e | 20 55 6e 69 76 65 72 73 |shington| Univers|
|00004a60| 69 74 79 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ity. | |
|00004a70| 20 20 20 20 42 65 6c 6c | 69 6e 67 68 61 6d 2c 20 | Bell|ingham, |
|00004a80| 57 41 20 39 38 32 32 36 | 0a 20 20 20 20 20 20 20 |WA 98226|. |
|00004a90| 0a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*******|********|
|00004aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ab0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ac0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ad0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 0a 0a 2f 2a |********|**/.../*|
|00004ae0| 20 41 49 58 20 64 65 6d | 61 6e 64 73 20 74 68 69 | AIX dem|ands thi|
|00004af0| 73 20 62 65 20 74 68 65 | 20 76 65 72 79 20 66 69 |s be the| very fi|
|00004b00| 72 73 74 20 74 68 69 6e | 67 20 69 6e 20 74 68 65 |rst thin|g in the|
|00004b10| 20 66 69 6c 65 2e 20 2a | 2f 0a 23 69 66 20 21 64 | file. *|/.#if !d|
|00004b20| 65 66 69 6e 65 64 28 5f | 5f 47 4e 55 43 5f 5f 29 |efined(_|_GNUC__)|
|00004b30| 20 26 26 20 64 65 66 69 | 6e 65 64 28 5f 41 49 58 | && defi|ned(_AIX|
|00004b40| 29 0a 20 23 70 72 61 67 | 6d 61 20 61 6c 6c 6f 63 |). #prag|ma alloc|
|00004b50| 61 0a 23 65 6e 64 69 66 | 0a 0a 2f 2a 20 69 6e 63 |a.#endif|../* inc|
|00004b60| 6c 75 64 65 20 73 79 73 | 74 65 6d 20 63 6f 6e 66 |lude sys|tem conf|
|00004b70| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|00004b80| 20 61 6c 6c 20 65 6c 73 | 65 2e 20 2a 2f 0a 23 69 | all els|e. */.#i|
|00004b90| 6e 63 6c 75 64 65 20 22 | 61 75 74 6f 63 6f 6e 66 |nclude "|autoconf|
|00004ba0| 2e 68 22 0a 0a 23 69 6e | 63 6c 75 64 65 20 22 67 |.h"..#in|clude "g|
|00004bb0| 64 62 6d 64 65 66 73 2e | 68 22 0a 23 69 6e 63 6c |dbmdefs.|h".#incl|
|00004bc0| 75 64 65 20 22 67 64 62 | 6d 65 72 72 6e 6f 2e 68 |ude "gdb|merrno.h|
|00004bd0| 22 0a 23 69 6e 63 6c 75 | 64 65 20 22 65 78 74 65 |".#inclu|de "exte|
|00004be0| 72 6e 2e 68 22 0a 0a 2f | 2a 20 49 6e 69 74 69 61 |rn.h"../|* Initia|
|00004bf0| 6c 69 7a 65 20 6e 64 62 | 6d 20 73 79 73 74 65 6d |lize ndb|m system|
|00004c00| 2e 20 20 46 49 4c 45 20 | 69 73 20 61 20 70 6f 69 |. FILE |is a poi|
|00004c10| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 66 69 6c 65 |nter to |the file|
|00004c20| 20 6e 61 6d 65 2e 20 20 | 49 6e 0a 20 20 20 73 74 | name. |In. st|
|00004c30| 61 6e 64 61 72 64 20 64 | 62 6d 2c 20 74 68 65 20 |andard d|bm, the |
|00004c40| 64 61 74 61 62 61 73 65 | 20 69 73 20 66 6f 75 6e |database| is foun|
|00004c50| 64 20 69 6e 20 66 69 6c | 65 73 20 63 61 6c 6c 65 |d in fil|es calle|
|00004c60| 64 20 46 49 4c 45 2e 70 | 61 67 20 61 6e 64 0a 20 |d FILE.p|ag and. |
|00004c70| 20 20 46 49 4c 45 2e 64 | 69 72 2e 20 20 54 6f 20 | FILE.d|ir. To |
|00004c80| 6d 61 6b 65 20 67 64 62 | 6d 20 63 6f 6d 70 61 74 |make gdb|m compat|
|00004c90| 61 62 6c 65 20 77 69 74 | 68 20 64 62 6d 20 75 73 |able wit|h dbm us|
|00004ca0| 69 6e 67 20 74 68 65 20 | 64 62 6d 69 6e 69 74 20 |ing the |dbminit |
|00004cb0| 63 61 6c 6c 2c 0a 20 20 | 20 74 68 65 20 73 61 6d |call,. | the sam|
|00004cc0| 65 20 66 69 6c 65 20 6e | 61 6d 65 73 20 61 72 65 |e file n|ames are|
|00004cd0| 20 75 73 65 64 2e 20 20 | 53 70 65 63 69 66 69 63 | used. |Specific|
|00004ce0| 61 6c 6c 79 2c 20 64 62 | 6d 69 6e 69 74 20 77 69 |ally, db|minit wi|
|00004cf0| 6c 6c 20 75 73 65 20 74 | 68 65 20 66 69 6c 65 0a |ll use t|he file.|
|00004d00| 20 20 20 6e 61 6d 65 20 | 46 49 4c 45 2e 70 61 67 | name |FILE.pag|
|00004d10| 20 69 6e 20 69 74 73 20 | 63 61 6c 6c 20 74 6f 20 | in its |call to |
|00004d20| 67 64 62 6d 20 6f 70 65 | 6e 2e 20 20 49 66 20 74 |gdbm ope|n. If t|
|00004d30| 68 65 20 66 69 6c 65 20 | 28 46 49 4c 45 2e 70 61 |he file |(FILE.pa|
|00004d40| 67 29 20 68 61 73 20 61 | 0a 20 20 20 73 69 7a 65 |g) has a|. size|
|00004d50| 20 6f 66 20 7a 65 72 6f | 20 62 79 74 65 73 2c 20 | of zero| bytes, |
|00004d60| 61 20 66 69 6c 65 20 69 | 6e 69 74 69 61 6c 69 7a |a file i|nitializ|
|00004d70| 61 74 69 6f 6e 20 70 72 | 6f 63 65 64 75 72 65 20 |ation pr|ocedure |
|00004d80| 69 73 20 70 65 72 66 6f | 72 6d 65 64 2c 0a 20 20 |is perfo|rmed,. |
|00004d90| 20 73 65 74 74 69 6e 67 | 20 75 70 20 74 68 65 20 | setting| up the |
|00004da0| 69 6e 69 74 69 61 6c 20 | 73 74 72 75 63 74 75 72 |initial |structur|
|00004db0| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 2e 20 20 |e in the| file. |
|00004dc0| 41 6e 79 20 65 72 72 6f | 72 20 64 65 74 65 63 74 |Any erro|r detect|
|00004dd0| 65 64 20 77 69 6c 6c 0a | 20 20 20 63 61 75 73 65 |ed will.| cause|
|00004de0| 20 61 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 | a retur|n value |
|00004df0| 6f 66 20 2d 31 2e 20 20 | 4e 6f 20 65 72 72 6f 72 |of -1. |No error|
|00004e00| 73 20 63 61 75 73 65 20 | 74 68 65 20 72 65 74 75 |s cause |the retu|
|00004e10| 72 6e 20 76 61 6c 75 65 | 20 6f 66 20 30 2e 0a 20 |rn value| of 0.. |
|00004e20| 20 20 4e 4f 54 45 3a 20 | 66 69 6c 65 2e 64 69 72 | NOTE: |file.dir|
|00004e30| 20 77 69 6c 6c 20 62 65 | 20 69 67 6e 6f 72 65 64 | will be| ignored|
|00004e40| 20 61 6e 64 20 77 69 6c | 6c 20 61 6c 77 61 79 73 | and wil|l always|
|00004e50| 20 68 61 76 65 20 61 20 | 73 69 7a 65 20 6f 66 20 | have a |size of |
|00004e60| 7a 65 72 6f 2e 0a 20 20 | 20 46 4c 41 47 53 20 61 |zero.. | FLAGS a|
|00004e70| 6e 64 20 4d 4f 44 45 20 | 61 72 65 20 74 68 65 20 |nd MODE |are the |
|00004e80| 73 61 6d 65 20 61 73 20 | 74 68 65 20 6f 70 65 6e |same as |the open|
|00004e90| 20 28 32 29 20 63 61 6c | 6c 2e 20 20 54 68 69 73 | (2) cal|l. This|
|00004ea0| 20 63 61 6c 6c 20 77 69 | 6c 6c 0a 20 20 20 6c 6f | call wi|ll. lo|
|00004eb0| 6f 6b 20 61 74 20 74 68 | 65 20 46 4c 41 47 53 20 |ok at th|e FLAGS |
|00004ec0| 61 6e 64 20 64 65 63 69 | 64 65 20 77 68 61 74 20 |and deci|de what |
|00004ed0| 63 61 6c 6c 20 74 6f 20 | 6d 61 6b 65 20 74 6f 20 |call to |make to |
|00004ee0| 67 64 62 6d 5f 6f 70 65 | 6e 2e 20 20 46 6f 72 0a |gdbm_ope|n. For.|
|00004ef0| 20 20 20 46 4c 41 47 53 | 20 3d 3d 20 4f 5f 52 44 | FLAGS| == O_RD|
|00004f00| 4f 4e 4c 59 2c 20 69 74 | 20 77 69 6c 6c 20 62 65 |ONLY, it| will be|
|00004f10| 20 61 20 47 44 42 4d 5f | 52 45 41 44 45 52 2c 20 | a GDBM_|READER, |
|00004f20| 69 66 20 46 4c 41 47 53 | 20 3d 3d 20 4f 5f 52 44 |if FLAGS| == O_RD|
|00004f30| 57 52 7c 4f 5f 43 52 45 | 41 54 2c 0a 20 20 20 69 |WR|O_CRE|AT,. i|
|00004f40| 74 20 77 69 6c 6c 20 62 | 65 20 61 20 47 44 42 4d |t will b|e a GDBM|
|00004f50| 5f 57 52 43 52 45 41 54 | 20 28 63 72 65 61 74 65 |_WRCREAT| (create|
|00004f60| 72 20 61 6e 64 20 77 72 | 69 74 65 72 29 20 61 6e |r and wr|iter) an|
|00004f70| 64 20 69 66 20 74 68 65 | 20 46 4c 41 47 53 20 3d |d if the| FLAGS =|
|00004f80| 3d 20 4f 5f 52 44 57 52 | 2c 0a 20 20 20 69 74 20 |= O_RDWR|,. it |
|00004f90| 77 69 6c 6c 20 62 65 20 | 61 20 47 44 42 4d 5f 57 |will be |a GDBM_W|
|00004fa0| 52 49 54 45 52 20 61 6e | 64 20 69 66 20 46 4c 41 |RITER an|d if FLA|
|00004fb0| 47 53 20 63 6f 6e 74 61 | 69 6e 20 4f 5f 54 52 55 |GS conta|in O_TRU|
|00004fc0| 4e 43 20 74 68 65 6e 20 | 69 74 20 77 69 6c 6c 20 |NC then |it will |
|00004fd0| 62 65 0a 20 20 20 61 20 | 47 44 42 4d 5f 4e 45 57 |be. a |GDBM_NEW|
|00004fe0| 44 42 2e 20 20 41 6c 6c | 20 6f 74 68 65 72 20 76 |DB. All| other v|
|00004ff0| 61 6c 75 65 73 20 6f 66 | 20 46 4c 41 47 53 20 69 |alues of| FLAGS i|
|00005000| 6e 20 74 68 65 20 66 6c | 61 67 73 20 61 72 65 0a |n the fl|ags are.|
|00005010| 20 20 20 69 67 6e 6f 72 | 65 64 2e 20 2a 2f 0a 0a | ignor|ed. */..|
|00005020| 67 64 62 6d 5f 66 69 6c | 65 5f 69 6e 66 6f 20 2a |gdbm_fil|e_info *|
|00005030| 0a 64 62 6d 5f 6f 70 65 | 6e 20 28 66 69 6c 65 2c |.dbm_ope|n (file,|
|00005040| 20 66 6c 61 67 73 2c 20 | 6d 6f 64 65 29 0a 20 20 | flags, |mode). |
|00005050| 20 20 20 63 68 61 72 20 | 2a 66 69 6c 65 3b 0a 20 | char |*file;. |
|00005060| 20 20 20 20 69 6e 74 20 | 66 6c 61 67 73 3b 0a 20 | int |flags;. |
|00005070| 20 20 20 20 69 6e 74 20 | 6d 6f 64 65 3b 0a 7b 0a | int |mode;.{.|
|00005080| 20 20 63 68 61 72 2a 20 | 70 61 67 5f 66 69 6c 65 | char* |pag_file|
|00005090| 3b 09 20 20 20 20 2f 2a | 20 55 73 65 64 20 74 6f |;. /*| Used to|
|000050a0| 20 63 6f 6e 73 74 72 75 | 63 74 20 22 66 69 6c 65 | constru|ct "file|
|000050b0| 2e 70 61 67 22 2e 20 2a | 2f 0a 20 20 63 68 61 72 |.pag". *|/. char|
|000050c0| 2a 20 64 69 72 5f 66 69 | 6c 65 3b 09 20 20 20 20 |* dir_fi|le;. |
|000050d0| 2f 2a 20 55 73 65 64 20 | 74 6f 20 63 6f 6e 73 74 |/* Used |to const|
|000050e0| 72 75 63 74 20 22 66 69 | 6c 65 2e 64 69 72 22 2e |ruct "fi|le.dir".|
|000050f0| 20 2a 2f 0a 20 20 73 74 | 72 75 63 74 20 73 74 61 | */. st|ruct sta|
|00005100| 74 20 64 69 72 5f 73 74 | 61 74 3b 09 20 20 20 20 |t dir_st|at;. |
|00005110| 2f 2a 20 53 74 61 74 20 | 69 6e 66 6f 72 6d 61 74 |/* Stat |informat|
|00005120| 69 6f 6e 20 66 6f 72 20 | 22 66 69 6c 65 2e 64 69 |ion for |"file.di|
|00005130| 72 22 2e 20 2a 2f 0a 20 | 20 67 64 62 6d 5f 66 69 |r". */. | gdbm_fi|
|00005140| 6c 65 5f 69 6e 66 6f 20 | 2a 74 65 6d 70 5f 64 62 |le_info |*temp_db|
|00005150| 66 3b 20 20 2f 2a 20 54 | 65 6d 70 6f 72 61 72 79 |f; /* T|emporary|
|00005160| 20 66 69 6c 65 20 70 6f | 69 6e 74 65 72 20 73 74 | file po|inter st|
|00005170| 6f 72 61 67 65 2e 20 2a | 2f 0a 0a 0a 20 20 2f 2a |orage. *|/... /*|
|00005180| 20 50 72 65 70 61 72 65 | 20 74 68 65 20 63 6f 72 | Prepare| the cor|
|00005190| 72 65 63 74 20 6e 61 6d | 65 73 20 6f 66 20 22 66 |rect nam|es of "f|
|000051a0| 69 6c 65 2e 70 61 67 22 | 20 61 6e 64 20 22 66 69 |ile.pag"| and "fi|
|000051b0| 6c 65 2e 64 69 72 22 2e | 20 2a 2f 0a 20 20 70 61 |le.dir".| */. pa|
|000051c0| 67 5f 66 69 6c 65 20 3d | 20 28 63 68 61 72 20 2a |g_file =| (char *|
|000051d0| 29 20 61 6c 6c 6f 63 61 | 20 28 73 74 72 6c 65 6e |) alloca| (strlen|
|000051e0| 20 28 66 69 6c 65 29 2b | 35 29 3b 0a 20 20 64 69 | (file)+|5);. di|
|000051f0| 72 5f 66 69 6c 65 20 3d | 20 28 63 68 61 72 20 2a |r_file =| (char *|
|00005200| 29 20 61 6c 6c 6f 63 61 | 20 28 73 74 72 6c 65 6e |) alloca| (strlen|
|00005210| 20 28 66 69 6c 65 29 2b | 35 29 3b 0a 0a 20 20 73 | (file)+|5);.. s|
|00005220| 74 72 63 70 79 20 28 70 | 61 67 5f 66 69 6c 65 2c |trcpy (p|ag_file,|
|00005230| 20 66 69 6c 65 29 3b 0a | 20 20 73 74 72 63 61 74 | file);.| strcat|
|00005240| 20 28 70 61 67 5f 66 69 | 6c 65 2c 20 22 2e 70 61 | (pag_fi|le, ".pa|
|00005250| 67 22 29 3b 0a 20 20 73 | 74 72 63 70 79 20 28 64 |g");. s|trcpy (d|
|00005260| 69 72 5f 66 69 6c 65 2c | 20 66 69 6c 65 29 3b 0a |ir_file,| file);.|
|00005270| 20 20 73 74 72 63 61 74 | 20 28 64 69 72 5f 66 69 | strcat| (dir_fi|
|00005280| 6c 65 2c 20 22 2e 64 69 | 72 22 29 3b 0a 20 20 0a |le, ".di|r");. .|
|00005290| 0a 20 20 2f 2a 20 43 61 | 6c 6c 20 74 68 65 20 61 |. /* Ca|ll the a|
|000052a0| 63 74 75 61 6c 20 72 6f | 75 74 69 6e 65 2c 20 73 |ctual ro|utine, s|
|000052b0| 61 76 69 6e 67 20 74 68 | 65 20 70 6f 69 6e 74 65 |aving th|e pointe|
|000052c0| 72 20 74 6f 20 74 68 65 | 20 66 69 6c 65 20 69 6e |r to the| file in|
|000052d0| 66 6f 72 6d 61 74 69 6f | 6e 2e 20 2a 2f 0a 20 20 |formatio|n. */. |
|000052e0| 66 6c 61 67 73 20 26 3d | 20 4f 5f 52 44 4f 4e 4c |flags &=| O_RDONL|
|000052f0| 59 20 7c 20 4f 5f 52 44 | 57 52 20 7c 20 4f 5f 43 |Y | O_RD|WR | O_C|
|00005300| 52 45 41 54 20 7c 20 4f | 5f 54 52 55 4e 43 3b 0a |REAT | O|_TRUNC;.|
|00005310| 20 20 69 66 20 28 66 6c | 61 67 73 20 3d 3d 20 4f | if (fl|ags == O|
|00005320| 5f 52 44 4f 4e 4c 59 29 | 0a 20 20 20 20 7b 0a 20 |_RDONLY)|. {. |
|00005330| 20 20 20 20 20 74 65 6d | 70 5f 64 62 66 20 3d 20 | tem|p_dbf = |
|00005340| 67 64 62 6d 5f 6f 70 65 | 6e 20 28 70 61 67 5f 66 |gdbm_ope|n (pag_f|
|00005350| 69 6c 65 2c 20 30 2c 20 | 47 44 42 4d 5f 52 45 41 |ile, 0, |GDBM_REA|
|00005360| 44 45 52 2c 20 30 2c 20 | 4e 55 4c 4c 29 3b 0a 20 |DER, 0, |NULL);. |
|00005370| 20 20 20 7d 0a 20 20 65 | 6c 73 65 20 69 66 20 28 | }. e|lse if (|
|00005380| 66 6c 61 67 73 20 3d 3d | 20 28 4f 5f 52 44 57 52 |flags ==| (O_RDWR|
|00005390| 20 7c 20 4f 5f 43 52 45 | 41 54 29 29 0a 20 20 20 | | O_CRE|AT)). |
|000053a0| 20 7b 0a 20 20 20 20 20 | 20 74 65 6d 70 5f 64 62 | {. | temp_db|
|000053b0| 66 20 3d 20 67 64 62 6d | 5f 6f 70 65 6e 20 28 70 |f = gdbm|_open (p|
|000053c0| 61 67 5f 66 69 6c 65 2c | 20 30 2c 20 47 44 42 4d |ag_file,| 0, GDBM|
|000053d0| 5f 57 52 43 52 45 41 54 | 2c 20 6d 6f 64 65 2c 20 |_WRCREAT|, mode, |
|000053e0| 4e 55 4c 4c 29 3b 0a 20 | 20 20 20 7d 0a 20 20 65 |NULL);. | }. e|
|000053f0| 6c 73 65 20 69 66 20 28 | 20 28 66 6c 61 67 73 20 |lse if (| (flags |
|00005400| 26 20 4f 5f 54 52 55 4e | 43 29 20 3d 3d 20 4f 5f |& O_TRUN|C) == O_|
|00005410| 54 52 55 4e 43 29 0a 20 | 20 20 20 7b 0a 20 20 20 |TRUNC). | {. |
|00005420| 20 20 20 74 65 6d 70 5f | 64 62 66 20 3d 20 67 64 | temp_|dbf = gd|
|00005430| 62 6d 5f 6f 70 65 6e 20 | 28 70 61 67 5f 66 69 6c |bm_open |(pag_fil|
|00005440| 65 2c 20 30 2c 20 47 44 | 42 4d 5f 4e 45 57 44 42 |e, 0, GD|BM_NEWDB|
|00005450| 2c 20 6d 6f 64 65 2c 20 | 4e 55 4c 4c 29 3b 0a 20 |, mode, |NULL);. |
|00005460| 20 20 20 7d 0a 20 20 65 | 6c 73 65 0a 20 20 20 20 | }. e|lse. |
|00005470| 7b 0a 20 20 20 20 20 20 | 74 65 6d 70 5f 64 62 66 |{. |temp_dbf|
|00005480| 20 3d 20 67 64 62 6d 5f | 6f 70 65 6e 20 28 70 61 | = gdbm_|open (pa|
|00005490| 67 5f 66 69 6c 65 2c 20 | 30 2c 20 47 44 42 4d 5f |g_file, |0, GDBM_|
|000054a0| 57 52 49 54 45 52 2c 20 | 30 2c 20 4e 55 4c 4c 29 |WRITER, |0, NULL)|
|000054b0| 3b 0a 20 20 20 20 7d 0a | 0a 20 20 2f 2a 20 44 69 |;. }.|. /* Di|
|000054c0| 64 20 77 65 20 73 75 63 | 63 65 73 73 66 75 6c 6c |d we suc|cessfull|
|000054d0| 79 20 6f 70 65 6e 20 74 | 68 65 20 66 69 6c 65 3f |y open t|he file?|
|000054e0| 20 2a 2f 0a 20 20 69 66 | 20 28 74 65 6d 70 5f 64 | */. if| (temp_d|
|000054f0| 62 66 20 3d 3d 20 4e 55 | 4c 4c 29 0a 20 20 20 20 |bf == NU|LL). |
|00005500| 7b 0a 20 20 20 20 20 20 | 67 64 62 6d 5f 65 72 72 |{. |gdbm_err|
|00005510| 6e 6f 20 3d 20 47 44 42 | 4d 5f 46 49 4c 45 5f 4f |no = GDB|M_FILE_O|
|00005520| 50 45 4e 5f 45 52 52 4f | 52 3b 0a 20 20 20 20 20 |PEN_ERRO|R;. |
|00005530| 20 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 0a 20 20 | return |NULL;. |
|00005540| 20 20 7d 0a 0a 20 20 2f | 2a 20 49 66 20 74 68 65 | }.. /|* If the|
|00005550| 20 64 61 74 61 62 61 73 | 65 20 69 73 20 6e 65 77 | databas|e is new|
|00005560| 2c 20 6c 69 6e 6b 20 22 | 66 69 6c 65 2e 64 69 72 |, link "|file.dir|
|00005570| 22 20 74 6f 20 22 66 69 | 6c 65 2e 70 61 67 22 2e |" to "fi|le.pag".|
|00005580| 20 54 68 69 73 20 69 73 | 20 64 6f 6e 65 0a 20 20 | This is| done. |
|00005590| 20 20 20 73 6f 20 74 68 | 65 20 74 69 6d 65 20 73 | so th|e time s|
|000055a0| 74 61 6d 70 20 6f 6e 20 | 62 6f 74 68 20 66 69 6c |tamp on |both fil|
|000055b0| 65 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 2e 20 |es is th|e same. |
|000055c0| 2a 2f 0a 20 20 69 66 20 | 28 73 74 61 74 20 28 64 |*/. if |(stat (d|
|000055d0| 69 72 5f 66 69 6c 65 2c | 20 26 64 69 72 5f 73 74 |ir_file,| &dir_st|
|000055e0| 61 74 29 20 3d 3d 20 30 | 29 0a 20 20 20 20 7b 0a |at) == 0|). {.|
|000055f0| 20 20 20 20 20 20 69 66 | 20 28 64 69 72 5f 73 74 | if| (dir_st|
|00005600| 61 74 2e 73 74 5f 73 69 | 7a 65 20 3d 3d 20 30 29 |at.st_si|ze == 0)|
|00005610| 0a 09 69 66 20 28 75 6e | 6c 69 6e 6b 20 28 64 69 |..if (un|link (di|
|00005620| 72 5f 66 69 6c 65 29 20 | 21 3d 20 30 20 7c 7c 20 |r_file) |!= 0 || |
|00005630| 6c 69 6e 6b 20 28 70 61 | 67 5f 66 69 6c 65 2c 20 |link (pa|g_file, |
|00005640| 64 69 72 5f 66 69 6c 65 | 29 20 21 3d 20 30 29 0a |dir_file|) != 0).|
|00005650| 09 20 20 7b 0a 09 20 20 | 20 20 67 64 62 6d 5f 65 |. {.. | gdbm_e|
|00005660| 72 72 6e 6f 20 3d 20 47 | 44 42 4d 5f 46 49 4c 45 |rrno = G|DBM_FILE|
|00005670| 5f 4f 50 45 4e 5f 45 52 | 52 4f 52 3b 0a 09 20 20 |_OPEN_ER|ROR;.. |
|00005680| 20 20 67 64 62 6d 5f 63 | 6c 6f 73 65 20 28 74 65 | gdbm_c|lose (te|
|00005690| 6d 70 5f 64 62 66 29 3b | 0a 09 20 20 20 20 72 65 |mp_dbf);|.. re|
|000056a0| 74 75 72 6e 20 4e 55 4c | 4c 3b 0a 09 20 20 7d 0a |turn NUL|L;.. }.|
|000056b0| 20 20 20 20 7d 0a 20 20 | 65 6c 73 65 0a 20 20 20 | }. |else. |
|000056c0| 20 7b 0a 20 20 20 20 20 | 20 2f 2a 20 53 69 6e 63 | {. | /* Sinc|
|000056d0| 65 20 77 65 20 63 61 6e | 27 74 20 73 74 61 74 20 |e we can|'t stat |
|000056e0| 69 74 2c 20 77 65 20 61 | 73 73 75 6d 65 20 69 74 |it, we a|ssume it|
|000056f0| 20 69 73 20 6e 6f 74 20 | 74 68 65 72 65 20 61 6e | is not |there an|
|00005700| 64 20 74 72 79 0a 20 20 | 20 20 20 20 20 20 20 74 |d try. | t|
|00005710| 6f 20 6c 69 6e 6b 20 74 | 68 65 20 64 69 72 5f 66 |o link t|he dir_f|
|00005720| 69 6c 65 20 74 6f 20 74 | 68 65 20 70 61 67 5f 66 |ile to t|he pag_f|
|00005730| 69 6c 65 2e 20 2a 2f 0a | 20 20 20 20 20 20 69 66 |ile. */.| if|
|00005740| 20 28 6c 69 6e 6b 20 28 | 70 61 67 5f 66 69 6c 65 | (link (|pag_file|
|00005750| 2c 20 64 69 72 5f 66 69 | 6c 65 29 20 21 3d 20 30 |, dir_fi|le) != 0|
|00005760| 29 0a 09 7b 0a 09 20 20 | 67 64 62 6d 5f 65 72 72 |)..{.. |gdbm_err|
|00005770| 6e 6f 20 3d 20 47 44 42 | 4d 5f 46 49 4c 45 5f 4f |no = GDB|M_FILE_O|
|00005780| 50 45 4e 5f 45 52 52 4f | 52 3b 0a 09 20 20 67 64 |PEN_ERRO|R;.. gd|
|00005790| 62 6d 5f 63 6c 6f 73 65 | 20 28 74 65 6d 70 5f 64 |bm_close| (temp_d|
|000057a0| 62 66 29 3b 0a 09 20 20 | 72 65 74 75 72 6e 20 4e |bf);.. |return N|
|000057b0| 55 4c 4c 3b 0a 09 7d 0a | 20 20 20 20 7d 0a 09 20 |ULL;..}.| }.. |
|000057c0| 20 20 20 0a 20 20 72 65 | 74 75 72 6e 20 74 65 6d | . re|turn tem|
|000057d0| 70 5f 64 62 66 3b 0a 7d | 0a 00 00 00 00 00 00 00 |p_dbf;.}|........|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005800| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 64 62 6d 64 65 |gdbm-1.7|.3/dbmde|
|00005810| 6c 65 74 65 2e 63 00 00 | 00 00 00 00 00 00 00 00 |lete.c..|........|
|00005820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005860| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00005870| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00005880| 20 20 20 33 30 31 35 20 | 20 35 35 30 37 33 30 33 | 3015 | 5507303|
|00005890| 37 32 33 20 20 20 37 36 | 32 34 00 20 00 00 00 00 |723 76|24. ....|
|000058a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a00| 2f 2a 20 64 62 6d 64 65 | 6c 65 74 65 2e 63 20 2d |/* dbmde|lete.c -|
|00005a10| 20 52 65 6d 6f 76 65 20 | 74 68 65 20 6b 65 79 20 | Remove |the key |
|00005a20| 61 6e 64 20 69 74 73 20 | 61 73 73 6f 63 69 61 74 |and its |associat|
|00005a30| 65 64 20 64 61 74 61 20 | 66 72 6f 6d 20 74 68 65 |ed data |from the|
|00005a40| 20 64 61 74 61 62 61 73 | 65 2e 0a 20 20 20 54 68 | databas|e.. Th|
|00005a50| 69 73 20 69 73 20 74 68 | 65 20 4e 44 42 4d 20 75 |is is th|e NDBM u|
|00005a60| 6e 69 78 20 69 6e 74 65 | 72 66 61 63 65 20 6e 61 |nix inte|rface na|
|00005a70| 6d 65 2e 20 20 2a 2f 0a | 0a 2f 2a 20 20 54 68 69 |me. */.|./* Thi|
|00005a80| 73 20 66 69 6c 65 20 69 | 73 20 70 61 72 74 20 6f |s file i|s part o|
|00005a90| 66 20 47 44 42 4d 2c 20 | 74 68 65 20 47 4e 55 20 |f GDBM, |the GNU |
|00005aa0| 64 61 74 61 20 62 61 73 | 65 20 6d 61 6e 61 67 65 |data bas|e manage|
|00005ab0| 72 2c 20 62 79 20 50 68 | 69 6c 69 70 20 41 2e 20 |r, by Ph|ilip A. |
|00005ac0| 4e 65 6c 73 6f 6e 2e 0a | 20 20 20 20 43 6f 70 79 |Nelson..| Copy|
|00005ad0| 72 69 67 68 74 20 28 43 | 29 20 31 39 39 30 2c 20 |right (C|) 1990, |
|00005ae0| 31 39 39 31 2c 20 31 39 | 39 33 20 20 46 72 65 65 |1991, 19|93 Free|
|00005af0| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00005b00| 74 69 6f 6e 2c 20 49 6e | 63 2e 0a 0a 20 20 20 20 |tion, In|c... |
|00005b10| 47 44 42 4d 20 69 73 20 | 66 72 65 65 20 73 6f 66 |GDBM is |free sof|
|00005b20| 74 77 61 72 65 3b 20 79 | 6f 75 20 63 61 6e 20 72 |tware; y|ou can r|
|00005b30| 65 64 69 73 74 72 69 62 | 75 74 65 20 69 74 20 61 |edistrib|ute it a|
|00005b40| 6e 64 2f 6f 72 20 6d 6f | 64 69 66 79 0a 20 20 20 |nd/or mo|dify. |
|00005b50| 20 69 74 20 75 6e 64 65 | 72 20 74 68 65 20 74 65 | it unde|r the te|
|00005b60| 72 6d 73 20 6f 66 20 74 | 68 65 20 47 4e 55 20 47 |rms of t|he GNU G|
|00005b70| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|00005b80| 63 65 6e 73 65 20 61 73 | 20 70 75 62 6c 69 73 68 |cense as| publish|
|00005b90| 65 64 20 62 79 0a 20 20 | 20 20 74 68 65 20 46 72 |ed by. | the Fr|
|00005ba0| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00005bb0| 64 61 74 69 6f 6e 3b 20 | 65 69 74 68 65 72 20 76 |dation; |either v|
|00005bc0| 65 72 73 69 6f 6e 20 32 | 2c 20 6f 72 20 28 61 74 |ersion 2|, or (at|
|00005bd0| 20 79 6f 75 72 20 6f 70 | 74 69 6f 6e 29 0a 20 20 | your op|tion). |
|00005be0| 20 20 61 6e 79 20 6c 61 | 74 65 72 20 76 65 72 73 | any la|ter vers|
|00005bf0| 69 6f 6e 2e 0a 0a 20 20 | 20 20 47 44 42 4d 20 69 |ion... | GDBM i|
|00005c00| 73 20 64 69 73 74 72 69 | 62 75 74 65 64 20 69 6e |s distri|buted in|
|00005c10| 20 74 68 65 20 68 6f 70 | 65 20 74 68 61 74 20 69 | the hop|e that i|
|00005c20| 74 20 77 69 6c 6c 20 62 | 65 20 75 73 65 66 75 6c |t will b|e useful|
|00005c30| 2c 0a 20 20 20 20 62 75 | 74 20 57 49 54 48 4f 55 |,. bu|t WITHOU|
|00005c40| 54 20 41 4e 59 20 57 41 | 52 52 41 4e 54 59 3b 20 |T ANY WA|RRANTY; |
|00005c50| 77 69 74 68 6f 75 74 20 | 65 76 65 6e 20 74 68 65 |without |even the|
|00005c60| 20 69 6d 70 6c 69 65 64 | 20 77 61 72 72 61 6e 74 | implied| warrant|
|00005c70| 79 20 6f 66 0a 20 20 20 | 20 4d 45 52 43 48 41 4e |y of. | MERCHAN|
|00005c80| 54 41 42 49 4c 49 54 59 | 20 6f 72 20 46 49 54 4e |TABILITY| or FITN|
|00005c90| 45 53 53 20 46 4f 52 20 | 41 20 50 41 52 54 49 43 |ESS FOR |A PARTIC|
|00005ca0| 55 4c 41 52 20 50 55 52 | 50 4f 53 45 2e 20 20 53 |ULAR PUR|POSE. S|
|00005cb0| 65 65 20 74 68 65 0a 20 | 20 20 20 47 4e 55 20 47 |ee the. | GNU G|
|00005cc0| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|00005cd0| 63 65 6e 73 65 20 66 6f | 72 20 6d 6f 72 65 20 64 |cense fo|r more d|
|00005ce0| 65 74 61 69 6c 73 2e 0a | 0a 20 20 20 20 59 6f 75 |etails..|. You|
|00005cf0| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 72 65 63 | should |have rec|
|00005d00| 65 69 76 65 64 20 61 20 | 63 6f 70 79 20 6f 66 20 |eived a |copy of |
|00005d10| 74 68 65 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 |the GNU |General |
|00005d20| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 0a 20 |Public L|icense. |
|00005d30| 20 20 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 47 44 | along| with GD|
|00005d40| 42 4d 3b 20 73 65 65 20 | 74 68 65 20 66 69 6c 65 |BM; see |the file|
|00005d50| 20 43 4f 50 59 49 4e 47 | 2e 20 20 49 66 20 6e 6f | COPYING|. If no|
|00005d60| 74 2c 20 77 72 69 74 65 | 20 74 6f 0a 20 20 20 20 |t, write| to. |
|00005d70| 74 68 65 20 46 72 65 65 | 20 53 6f 66 74 77 61 72 |the Free| Softwar|
|00005d80| 65 20 46 6f 75 6e 64 61 | 74 69 6f 6e 2c 20 36 37 |e Founda|tion, 67|
|00005d90| 35 20 4d 61 73 73 20 41 | 76 65 2c 20 43 61 6d 62 |5 Mass A|ve, Camb|
|00005da0| 72 69 64 67 65 2c 20 4d | 41 20 30 32 31 33 39 2c |ridge, M|A 02139,|
|00005db0| 20 55 53 41 2e 0a 0a 20 | 20 20 20 59 6f 75 20 6d | USA... | You m|
|00005dc0| 61 79 20 63 6f 6e 74 61 | 63 74 20 74 68 65 20 61 |ay conta|ct the a|
|00005dd0| 75 74 68 6f 72 20 62 79 | 3a 0a 20 20 20 20 20 20 |uthor by|:. |
|00005de0| 20 65 2d 6d 61 69 6c 3a | 20 20 70 68 69 6c 40 63 | e-mail:| phil@c|
|00005df0| 73 2e 77 77 75 2e 65 64 | 75 0a 20 20 20 20 20 20 |s.wwu.ed|u. |
|00005e00| 75 73 2d 6d 61 69 6c 3a | 20 20 50 68 69 6c 69 70 |us-mail:| Philip|
|00005e10| 20 41 2e 20 4e 65 6c 73 | 6f 6e 0a 20 20 20 20 20 | A. Nels|on. |
|00005e20| 20 20 20 20 20 20 20 20 | 20 20 20 43 6f 6d 70 75 | | Compu|
|00005e30| 74 65 72 20 53 63 69 65 | 6e 63 65 20 44 65 70 61 |ter Scie|nce Depa|
|00005e40| 72 74 6d 65 6e 74 0a 20 | 20 20 20 20 20 20 20 20 |rtment. | |
|00005e50| 20 20 20 20 20 20 20 57 | 65 73 74 65 72 6e 20 57 | W|estern W|
|00005e60| 61 73 68 69 6e 67 74 6f | 6e 20 55 6e 69 76 65 72 |ashingto|n Univer|
|00005e70| 73 69 74 79 0a 20 20 20 | 20 20 20 20 20 20 20 20 |sity. | |
|00005e80| 20 20 20 20 20 42 65 6c | 6c 69 6e 67 68 61 6d 2c | Bel|lingham,|
|00005e90| 20 57 41 20 39 38 32 32 | 36 0a 20 20 20 20 20 20 | WA 9822|6. |
|00005ea0| 20 0a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | .******|********|
|00005eb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ec0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ed0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ee0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 0a 0a 2f |********|***/.../|
|00005ef0| 2a 20 69 6e 63 6c 75 64 | 65 20 73 79 73 74 65 6d |* includ|e system|
|00005f00| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00005f10| 65 66 6f 72 65 20 61 6c | 6c 20 65 6c 73 65 2e 20 |efore al|l else. |
|00005f20| 2a 2f 0a 23 69 6e 63 6c | 75 64 65 20 22 61 75 74 |*/.#incl|ude "aut|
|00005f30| 6f 63 6f 6e 66 2e 68 22 | 0a 0a 23 69 6e 63 6c 75 |oconf.h"|..#inclu|
|00005f40| 64 65 20 22 67 64 62 6d | 64 65 66 73 2e 68 22 0a |de "gdbm|defs.h".|
|00005f50| 23 69 6e 63 6c 75 64 65 | 20 22 65 78 74 65 72 6e |#include| "extern|
|00005f60| 2e 68 22 0a 0a 0a 2f 2a | 20 52 65 6d 6f 76 65 20 |.h".../*| Remove |
|00005f70| 74 68 65 20 4b 45 59 65 | 64 20 69 74 65 6d 20 61 |the KEYe|d item a|
|00005f80| 6e 64 20 74 68 65 20 4b | 45 59 20 66 72 6f 6d 20 |nd the K|EY from |
|00005f90| 74 68 65 20 64 61 74 61 | 62 61 73 65 20 44 42 46 |the data|base DBF|
|00005fa0| 2e 20 2a 2f 0a 0a 69 6e | 74 0a 64 62 6d 5f 64 65 |. */..in|t.dbm_de|
|00005fb0| 6c 65 74 65 20 28 64 62 | 66 2c 6b 65 79 29 0a 20 |lete (db|f,key). |
|00005fc0| 20 20 20 20 67 64 62 6d | 5f 66 69 6c 65 5f 69 6e | gdbm|_file_in|
|00005fd0| 66 6f 20 2a 64 62 66 3b | 0a 20 20 20 20 20 64 61 |fo *dbf;|. da|
|00005fe0| 74 75 6d 20 6b 65 79 3b | 0a 7b 0a 20 20 72 65 74 |tum key;|.{. ret|
|00005ff0| 75 72 6e 20 67 64 62 6d | 5f 64 65 6c 65 74 65 20 |urn gdbm|_delete |
|00006000| 28 64 62 66 2c 6b 65 79 | 29 3b 0a 7d 0a 00 00 00 |(dbf,key|);.}....|
|00006010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006200| 67 64 62 6d 2d 31 2e 37 | 2e 33 2f 64 62 6d 66 65 |gdbm-1.7|.3/dbmfe|
|00006210| 74 63 68 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |tch.c...|........|
|00006220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006260| 00 00 00 00 20 20 20 36 | 36 36 20 00 20 32 31 36 |.... 6|66 . 216|
|00006270| 34 31 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |41 . |13 . |
|00006280| 20 20 20 33 37 34 35 20 | 20 35 35 30 37 33 30 33 | 3745 | 5507303|
|00006290| 37 36 36 20 20 20 37 34 | 37 34 00 20 00 00 00 00 |766 74|74. ....|
|000062a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.